Operating System - HP-UX
1834516 Members
2084 Online
110068 Solutions
New Discussion

Re: supplemental group number limit?

 
SOLVED
Go to solution
Nabil Boussetta
Frequent Advisor

supplemental group number limit?

i'd like to create a user with more than 20 supplemental group.
when i execute the following command:
"useradd -m -G g1,g2,g3,g4,g5,g6,g7,g8,g9,g10,g11,g12,g13,g14,g15, g16,g17,g18,g19,g20,g21 user1".
i receive the following error:
Group does not exist
Group list specified with -G is invalid

i'd like to know if it is possible or no to create a user with more than 20 supplemental group ?
5 REPLIES 5
Devender Khatana
Honored Contributor

Re: supplemental group number limit?

Hi,

You need to have all these groups defined in the system. Check /etc/group file if it contains all these groups. The error indicates that all groups are not defined in /etc/group. So first do a group add for all the groups.

I do not think there should be any restictions of no. of supplemental groups.

HTH,
Devender
Impossible itself mentions "I m possible"
Pete Randall
Outstanding Contributor
Solution

Re: supplemental group number limit?

There is a maximum, defined in /usr/include/limits.h by the paramter NGROUPS_MAX, which is normally set to 20. See the man pages for group:

"No user should be associated with more than NGROUPS (see setgroups(2)) groups in /etc/logingroup."

and setgroup:

"The parameter ngroups indicates the number of entries in the array and must be no more than NGROUPS_MAX, as defined in ."


Pete

Pete
Nabil Boussetta
Frequent Advisor

Re: supplemental group number limit?

all these groups are defined in the system. but i still receive the same error
Nabil Boussetta
Frequent Advisor

Re: supplemental group number limit?

thnak you,Pete Randall.
is it possible to modify this param?
Pete Randall
Outstanding Contributor

Re: supplemental group number limit?

This thread seems to imply that you can raise this limit:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=383686

I guess you would alter /usr/include/limits.h and then build a new kernel??


Pete

Pete