Visit Our UNIX and Linux User Community

user & groups

Thread Tools Search this Thread
Operating Systems AIX user & groups
# 1  
Old 04-18-2009
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 ?
# 2  
Old 04-18-2009
2000 users per group, but a user can be in every group you have on the system
Hope that helps
kind regards
# 3  
Old 04-19-2009
Originally Posted by zxmaus
[...]2000 users per group[...]
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?
# 4  
Old 04-19-2009
just wanted to confirm is this also applicable to other Linux operating system ?
# 5  
Old 04-19-2009

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.

# 6  
Old 04-19-2009
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
# 7  
Old 04-19-2009
Originally Posted by zxmaus
[...]the info is from IBM AIX Support [...]:
according to them, it is set in /usr/include/grp.h and either cannot or should not be changed.[...]
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 Smilie
#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:
AIX development does not intend to increase MAXGRP beyond 2000 because it would introduce binary compatiblity problems (due to static definitions) and because of the limited demand for this capabilily.
Yes - the limited demand... Smilie

@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.

Previous Thread | Next Thread
Test Your Knowledge in Computers #890
Difficulty: Easy
In sed, the REGEX dot (.) matches exactly one character.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to get User list from different groups and root?

Hi all, I want to list out users from different group and root, who are roaming in our group or root as a user. how can i list out this users ? (1 Reply)
Discussion started by: kpatel97
1 Replies

2. AIX

Nested user groups

Is there a command to nest a group in another group in AIX. (2 Replies)
Discussion started by: daveisme
2 Replies

3. Shell Programming and Scripting

Shell script for to view all users & groups history in root

Dear All, I want to know all users & group history in one file, for root terminal through shell or any other option (5 Replies)
Discussion started by: kpoobathi
5 Replies

4. UNIX for Dummies Questions & Answers

How to add user to multiple groups

hi all i am new to solaris how to add a user to multiple(secondary) groups. user :anna Groups : delhi ,mumbai,pune i need like this in cat /etc/group delhi::anna mumbai::anna pune::anna i tried using usermod -a -G hyd anna that does int work how to delete user from group... (3 Replies)
Discussion started by: kalyankalyan
3 Replies

5. AIX

Security user Can't change the groups.

Dears Security users in AIX don’t have permission to change the group of the user thru Smitty Users When they try to change the group of the users to any group they'll get permission denied Security profile in Smitty : User... (10 Replies)
Discussion started by: ITHelper
10 Replies

6. Solaris

Setting user groups

Hi......... I'm trying to set a group of users to login to do a required super-user tasks without knowing the super-user passwd. For example...a user popodude logs in as self with passwd..system accepts the password & then automatically asks for the super-user account passwd. My goal is... (1 Reply)
Discussion started by: Remi
1 Replies

7. UNIX for Dummies Questions & Answers

User groups

Hi I have a user zak and 4 groups:- oracle stats data archive I want user zak to be part of the oracle and stats group but not be able to view,list anything in data and archive. Also anyone in the data and archive group should not be able to view,list anything in oracle and stats....... (3 Replies)
Discussion started by: Zak
3 Replies

8. UNIX for Dummies Questions & Answers

Adding user to groups

How do I add a user to a group? And how do I determine the list of groups to add a user? Solaris 10 newbie (1 Reply)
Discussion started by: peteythapitbull
1 Replies

9. Shell Programming and Scripting

Extract directories, users, groups & permissions to excel

Hi As the title descibes I wish to create an excel spreadsheet which lists all directories in full allong with the users, groups and rights. I have not used Perl scripts before so I'm a little lost on this on. Cheers (0 Replies)
Discussion started by: MacLon
0 Replies

10. UNIX for Dummies Questions & Answers

dynamic user groups

Is it possible to dynamically allocate a new user group to an existing session on Solaris 5.8 I'd like to be able to allow certain users to access a set of scripts for the life of session (preferably there own session not a specific login created for the purpose) by dynamically giving the session... (0 Replies)
Discussion started by: hammer
0 Replies

Featured Tech Videos