Operating System - HP-UX
1827428 Members
3998 Online
109965 Solutions
New Discussion

Groups in groups in the /etc/group file

 
Jayne Krygier
New Member

Groups in groups in the /etc/group file

Is it possible to add a group in a group in the /etc/group file

For Example:
groupa::100:me
groupb::200:you
groupc::300:groupa,groupb
Life's a beach...I wish I were on one
7 REPLIES 7
Wieslaw Krajewski
Honored Contributor

Re: Groups in groups in the /etc/group file

Hi,

This is impossible

Rgds.
Permanent training makes master
Bruce Regittko_1
Esteemed Contributor

Re: Groups in groups in the /etc/group file

Hi,

Nope, can't put a group in a group. See the man page for the group(4) file for more information.

--Bruce
www.stratech.com/training
boley janowski
Trusted Contributor

Re: Groups in groups in the /etc/group file

you can not set groups up to call other groups, you can test this by pretty easy by define the group with another group such as

users::20:root,sys
sys::3:root,uucp

with sys being the group, and after saving the /etc/group. at the command line type "groups uucp" provided uucp is not stated specifically under group users it will return only sys. this can cause confusion because in many cases there are users that are also groups such as root,lp,bin. hope this helps.
Vincenzo Restuccia
Honored Contributor

Re: Groups in groups in the /etc/group file

Impossible,if you want verify it with SAM.

Tim D Fulford
Honored Contributor

Re: Groups in groups in the /etc/group file

As far as groups being members of groups no can do. Obviously you expand it to be the members, tedious but necessary.

However, just one extra thing here, make sure /etc/logingroup is linked to /etc/group otherwise the users in say groupa will need to loginto groupa if it is not their primary group!

link the group & login group file
# ln -s /etc/group /etc/logingroup

Check it
#ls -l /etc/*group
-r--r--r-- 1 bin bin 310 Apr 30 10:43 /etc/group
lrwxr-xr-x 1 root sys 10 May 2 13:21 /etc/logingroup@ -> /etc/group

Cheers

Tim
-
MANOJ SRIVASTAVA
Honored Contributor

Re: Groups in groups in the /etc/group file

Hi Jayne

Let us go to basics ,ie a collection of user form a group . So infact you can have a group with a collection of groups however you can have the groupC with all the memebers of groupA and groupB.

Manoj
MANOJ SRIVASTAVA
Honored Contributor

Re: Groups in groups in the /etc/group file

OOps sorry it should read as :

So infact you can not have a group with a collection of groups however you can have the groupC with all the memebers of groupA and groupB.