"newgrp: too many groups" - why is it complaining?
In my earlier question, I got a response recommending the "newgrp" command. It diligently did the job of putting my desired group at the "top of the list" for the "id" command, but, why does it also complain about "too many groups"? What is the limit, and, where is the documentation about that?
Solution 1:
From the source code of newgrp
if (ngrps == NGROUPS_MAX)
warnx("too many groups");
and I think NGROUPS_MAX is defined as 16.
That is given in syslimits.h
Solution 2:
Yes in Macosx ngroups is 16
Run "sysctl kern.ngroups"
And btw it cannot be changed with "sysctl -w "