From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075319906601.tru64-unix-managers.marc@archive.invalid> From: Maurice.Steyvers () ICA ! RULIMBURG ! NL Date: Thu, 18 May 1995 12:52:17 +0000 To: tru64-unix-managers Subject: SUMMARY: Number of users in one group X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075319906601 Thanks to all who responded. Below is the original question followed by some of the answers. QUESTION: ------------------------------------------------------------------------------ On our Alpha 2100 (OSF/1 3.0A) we're about to create nearly 4000 usernames. The accounts are only used for POP mail access (so login-shell is /bin/false, no files except mailspool). In the man page of the adduser script i saw that there is a limit to the number of users you can put in one group. The limit is set by the variable LINEMAX in the file limits.h. It takes a kernel rebuild to change this limit. My original plan was to put all 4000 usernames in one group but after reading the above i'm not so sure anymore. My questions are: - given the default value of LINEMAX, how many users can be put in one group ? - is there an other way to get that many users in one group ? - because these 4000 usernames are all in only one group (their primary group !!) is it possible to just leave all these usernames out of the /etc/group file (since their primary group id is in the /etc/passwd i don't see the need of putting i also in the /etc/group file, or am i wrong ?) ------------------------------------------------------------------------------ ANSWERS: 1) the user is automaticly a member of the group that's listed in the /etc/passwd file. The user does not need an entry in the /etc/group file to be a mem- ber of that group. Therefore, e.g., add the entry to /etc/group popusers:*:299: and set the gid in the /etc/passwd file to 299 for all the 4000 users. 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. 2) Find the average length of a user name and add one. Divide LINEMAX by the average name length and this is an estimate of the number of names you can have. One thing to keep in mind is that names in group list ONLY need to be ADDITIONAL groups. The group id field of the password file specifies the first group. The group file is then used to add others. So, if you have 4000 users in a group, use that group id in the password file and then only use /etc/group for extra groups. 3) We had exceeded our limit by a very large amount. To work around it, we created sub-groups of users and then combined all those subgroups into 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,...... Maurice Steyvers Univ. of Limburg Maastricht, NL