[Samba] How to increase number of additional groups

Peter Kruse pk at q-leap.com
Tue May 9 11:02:49 GMT 2006


Hello,

Using samba 3.0.22 under Debian/Sarge with Kernel 2.6.15.3

We need support for more additional groups than the the default of 32
per user.  In Version 3.0.14a of samba we had to modify the value
of NGROUPS_MAX in limits.h, recompile samba and also recompile
the kernel with the increased value.  This does not work in 3.0.22
anymore.  We found in lib/system.c:

/**************************************************************************
  Returns equivalent to NGROUPS_MAX - using sysconf if needed.
****************************************************************************/

int groups_max(void)
{
   #if defined(SYSCONF_SC_NGROUPS_MAX)
         int ret = sysconf(_SC_NGROUPS_MAX);
         return (ret == -1) ? NGROUPS_MAX : ret;
#else
         return NGROUPS_MAX;
#endif
}

And modified it to read:

int groups_max(void)
{
         return 65536;
}

But it makes no difference.  The problem is still the same:
If there is a directory mounted with ACL support, and a group
permission is set to rwx, and a user as a member of this group
wants to access this as a smb share, access is denied if this
user is a mamber of more than 32 groups.  If the user is a member
of less than 32 groups access is granted.

I have also found this message:

http://lists.debian.org/debian-glibc/2004/06/msg00034.html

which suggests to recompile libc, but since that was not
neccessary I would like to know how do people get
support for more groups per user.  This topic
has come up some times in this list, but there is
no clear answer of how to do it.
Would be nice if someone could answer.

Thanks,

	Peter



More information about the samba mailing list