Question regarding "Number of users in one group"

From: Kristian Koehntopp <kris_at_oekoalpha.pz-oekosys.uni-kiel.d400.de>
Date: Fri, 19 May 1995 13:35:23 +0200

maurice.steyvers_at_ica.rulimburg.nl wrote:
> It has been our experience here that more than 12 users in one group will
> cause a message of "Userid in too many groups" to be generated. This
> is merely an annoyance. However, we have found that 32 or more users in
> a group causes that group to become brain dead and unusable.

I was aware that there is a limit in the number of groups a single user can
be in and I had in mind that this limits was a small power of two like 8, 16
or 32 (depending for example on the type and version of NFS one is using).

setgroups(2) and getgroups(2) both mention a limits.h constant called
NGROUPS_MAX, but if I go looking for it like this

kris_at_oekoalpha /home/kris> grep NGROUPS_MAX /usr/include/limits.h
#define _POSIX_NGROUPS_MAX 0

I don't find a reasonable number. But group(4) tells something about this in
the RESTRICTIONS section:

  Increasing the number of groups that a user is in beyond 16 can
  affect services that use ONC RPC. This version of ONC RPC supports
  up to 32 groups. This is for compatibility with ULTRIX V4.2 systems
  and beyond. Many OSF and ONC vendors can only support user membership
  of up to 16 groups. In addition, versions of ULTRIX earlier than V4.2,
  as well as some OSF vendors, support only 8 groups over ONC RPC.

  Users who increase their group membership beyond 8 or 16 groups will
  not be able to NFS mount file systems from servers that only support
  8 or 16 groups over NFS. In addition, if root group membership is
  increased beyond 8 or 16, the NIS service will not work in a mixed
  NIS server environment where the servers only 8 or 16 groups.


Also, I cannot come up why there should be a limit on the number of users
per group. What is the limiting factor here?

> a main group. I will attempt to explain:
>
> sub1:*:30:name1,name2,name3....
> sub2:*:31:name10,name11,name12,...
> sub3:*:32:name21,name21,name23,...
>
> main_grp:*:sub1,sub2,sub3,......
>

I was not aware of the fact that group names can be used in field 4 of the
group file. The documentation of group(4) only mentions user names. Does
this really work?

Kristian
Received on Fri May 19 1995 - 12:34:10 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT