user & groups

1 - what is the maximum no: of groups a user can be a part of ?
2 - what is maximum no: of users a group can contain ?

Senmak,
2000 users per group, but a user can be in every group you have on the system
Hope that helps
kind regards
zxmaus

Hm, this point might need clarification. Could you post a link (preferably to the IBM pSeries and AIX Information center) where you got that number from?

just wanted to confirm is this also applicable to other Linux operating system ?

Hi,

the info is from IBM AIX Support in uk a couple of months ago:
according to them, it is set in /usr/include/grp.h and either cannot or should not be changed.

Rgds
zxmaus

If your users have their home directories or shared applications NFS V3 mounted from a NFS file server then the maximum number of groups a user may be in is 16.

The maximum number users in a groups is determined by the total string length (1024 iirc) but you can get around this by having numerous groups with the same GID, e.g.:
name GID
group 1100
groupa 1100
groupb 1100
groupc 1100

Thanks, zxmaus. So the pointer is still to the length of a line in the /etc/group file. It is just as it was in AIX 4 times - disappointing :frowning:

#define MAXGRP          2000
/* In GRPLINLEN the 14 represents the ":!:GID LENGTH:" in the group file. */
#define GRPLINLEN       (L_cuserid) + ((L_cuserid + 1) * MAXGRP) + 14

(I copied the header lines from an 5.3 TL 9 system just for completeness of this thread). I searched the web and found that apparently there where Design Change Requests before, one being MR0214024620. This DCR got rejected for the following reason:

Yes - the limited demand... :smiley:

@OP that does mean for your question No. 2: You cannot have more than 2000 users with a user name length of eight chars in one line in /etc/group (i.e. about 16000 chars). Mind that mkuser lets you create groups with more than 2000 users without complaining and that grpck will not report errors on such groups as long as you stay below the line length limit (e.g. when using usernames shorter than 8 chars). But you have the opportunity to have more than 2k users in one group without (unexpected) problems by using the workaround from AIX 4 times: you define several group names (group1, group2, group3) in several lines that all have the same group ID. This way you can get around that limit without hitting the named binary compatibility problems.