Skip to content
Advertisement

how to unlimit the number of group for one user in centos4/5

If one user have more than 16 groups, it will cause that the groups don’t work for permission control.

How to unlimited this number of groups per user in Centos4/5 ?

Advertisement

Answer

You can’t unlimit the additionnal groups per user. But you can raise the limit. Beware that most Unix systems are limited to 16 groups per user (see http://www.j3e.de/ngroups.html) , so does NFS, see https://xkyle.com/solving-the-nfs-16-group-limit-problem/ and/or http://nfsworld.blogspot.fr/2005/03/whats-deal-on-16-group-id-limitation.html

The number of group per user is defined by NGROUPS_MAX from <limits.h> but should be read with sysconf(_SC_NGROUPS_MAX). You can change the kernel maximum group count with sysctl kernel.ngroupmax or /proc/sys/kernel/ngroups_max. But this will require support from C library, PAM and login program.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement