GROUPS CONTAINING OTHER GROUPS (/etc/group)

GROUPS CONTAINING OTHER GROUPS (/etc/group)

Post by Jeffrey J. Rodrigu » Fri, 23 Apr 1993 08:28:49



Is there a way to do something like the following:

/etc/group
----------------
staff:*:10:
student:*:20:
staff+student:*:staff,student
guest:*:40:

That is, I'd like to be able to create a file
owned by "staff+student".  Then users in the "staff"
group or in the "student" group could access the
file.  But users in "guest" could not access the file.

Jeff Rodriguez

 
 
 

GROUPS CONTAINING OTHER GROUPS (/etc/group)

Post by Barry Margol » Fri, 23 Apr 1993 14:40:22



Quote:>Is there a way to do something like the following:

>/etc/group
>----------------
>staff:*:10:
>student:*:20:
>staff+student:*:staff,student
>guest:*:40:

Not directly.  You could do it with a preprocessor:

/etc/group.cpp
-----------------
#define STAFF user1,user2,user3,user4,user5
#define STUDENT user6,user7,user8,user9
staff:*:10:STAFF
student:*:20:STUDENT
staff+student:*:STAFF,STUDENT
guest:*:40

Then you do "cpp /etc/group.cpp >/etc/group".

However, the staff+student group won't include users who are in staff or
student only because it's their primary group from their passwd entry.
You'll have to list everyone in /etc/group.cpp.

--
Barry Margolin
System Manager, Thinking Machines Corp.



 
 
 

GROUPS CONTAINING OTHER GROUPS (/etc/group)

Post by Jan Wortelbo » Fri, 23 Apr 1993 23:23:45



Quote:>Is there a way to do something like the following:
>/etc/group
>----------------
>staff:*:10:
>student:*:20:
>staff+student:*:staff,student
>guest:*:40:
>That is, I'd like to be able to create a file
>owned by "staff+student".  Then users in the "staff"
>group or in the "student" group could access the
>file.  But users in "guest" could not access the file.

Just make the file from root, group guest and
chmod 707 file then if somebody has the group
guest he cant access the file ;-)

Jan.
--
Jan Wortelboer,  University of Amsterdam

Unix             Kruislaan 403 Kamer F003     Phone: +31 20 525 7501
systems manager  1098 SJ AMSTERDAM            Fax  : +31 20 525 7490

 
 
 

1. /etc/group groups inside of groups?

I seem to remember at my old company having groups inside of groups,
at least for NIS.

My new company isn't using NIS.  I don't really have a test machine
I can play with, so I'm hoping that someone out there can answer
this for me:  can I have groups within groups in /etc/group?

For example:

a::1000:user1,user2,user3
b::2000:user1,user4,user5
c::3000:a,b

Will group c have user1,user2,user3,user4,user5?
(I assume the duplication of user1 will not cause it to be added twice)

Thanks!

--

(don't send big files here, write me for another address)  ._o
*** I don't speak for ABI Inc.                               |>
*** I get into enough trouble speaking for myself!           4

2. REPOST: Re: Article: Want Media Player 8? Buy Windows XP

3. Group containing other group(s)?

4. Windows Services for Unix 3.0

5. cannot set up UMASK or groups so that users from one group cannot access other groups

6. fvwm problems

7. grouping a group to a group?

8. How to use 3Com 3C562 Card when installing Redhat using FTP

9. Keeping groups, groups and groups straight

10. user and group management - how to emulate groups into groups in linux ?

11. redefining group id's in /etc/group ???

12. Huge group (/etc/group)

13. manually delting group from /etc/group