Operating System - HP-UX
1830166 Members
5342 Online
109999 Solutions
New Discussion

Nested Groups in HP-UX -- Possible??

 
Aravindh Rajaram
Honored Contributor

Nested Groups in HP-UX -- Possible??

Hi All,

Can we create nested groups in HP-UX?
For Eg. if there are Group A, Group B and few users, Group C should contain Group A + some users.

Thanks in advance!
Aravindh
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Nested Groups in HP-UX -- Possible??

Since a user can belong to secondary groups, this seems possible.

user1 primary group users secondary group dev


user2 primary group users

user3 primary group dev


dev group includes user1 user3

users groiup includes user1 user2

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: Nested Groups in HP-UX -- Possible??

The /etc/group file, by definition, consists of a list of groups, each followed by a list of user names that belong to that group. It expects to find those names in the passwd file and won't know how to look them up in the group file.


Pete

Pete
Doug Burton
Respected Contributor

Re: Nested Groups in HP-UX -- Possible??

You may want to take a look at this in ITRC:
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063248515

In short...

So, since the max number of users per group is 222, and if you were to create 2
groups, group1 and group2, with the same GID, and if you were to
add 200 users to each of group1 and group2, unix will see that
there are effectively 400 users under one GID and behave erratically as a
result.

As an aside, in 11.0, the group(4) man page indicates:
The length of each line in /etc/group is limited to LINE_MAX, as defined
in . Because of this limit, users should not be listed in
their primary group - only in any secondary groups. If necessary, primary group
inventory can be calculated via the /etc/passwd file.
Doug Burton
Respected Contributor

Re: Nested Groups in HP-UX -- Possible??

Opps... forgot to mention...

Make group1 = 200 users (let's say).
Make group2 = 200 users
Then group3 has the group1 and 2 name in it (not the users).
Patrick Wallek
Honored Contributor

Re: Nested Groups in HP-UX -- Possible??

1 group can not be a member of another group. That is not supported. I added the following 2 lines to the /etc/group file:

pww::108:
wwp::109:pww

I then ran a grpck command to verify the group file. It came back with the following:

# grpck
wwp::109:pww
pww - Logname not found in password file

So, trying to make the pww group part of the wwp group will not work.
Aravindh Rajaram
Honored Contributor

Re: Nested Groups in HP-UX -- Possible??

a