0

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 ?

ekad
  • 14,436
  • 26
  • 44
  • 46
wei
  • 65
  • 2
  • 7

1 Answers1

2

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.

Yann Droneaud
  • 5,277
  • 1
  • 23
  • 39
  • Hi ydroneaud,thanks for your good answer. I check the /proc/sys/kernel/ngroups_max and the value is 65536. And the problem seems come from NFS – wei Oct 21 '12 at 14:16
  • If nothing in the articles worked, there's a patch at http://www.frankvm.com/nfs-ngroups/ , see http://www.frankvm.com/nfs-ngroups/README – Yann Droneaud Mar 01 '13 at 16:53