1834903 Members
2601 Online
110071 Solutions
New Discussion

Secondary groups Limit

 
Amit Kureel
Advisor

Secondary groups Limit

What is the maximum no. of secondary groups that any user can be assigned ? Is it NGROUPS(=20) as defined in limits.h ?

Amit Kureel
2 REPLIES 2
Pete Randall
Outstanding Contributor

Re: Secondary groups Limit

From man group:
All group IDs used in /etc/logingroup or /etc/passwd should be defined
in /etc/group. No user should be associated with more than NGROUPS
(see setgroups(2)) groups in /etc/logingroup.

And, from man 2 setgroups:
setgroups() sets the group access list of the current user process
according to the array gidset. The parameter ngroups indicates the
number of entries in the array and must be no more than NGROUPS_MAX,
as defined in .

Pete

Pete
Peter Kloetgen
Esteemed Contributor

Re: Secondary groups Limit

Hi Amit,

yep, that is the limit of secondary groups.
( man limits )

Allways stay on the bright side of life!

Peter
I'm learning here as well as helping