is it possible to have a 1000 user in single group


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users is it possible to have a 1000 user in single group
# 1  
Old 11-12-2008
is it possible to have a 1000 user in single group

I m usi ng RHEL 4 and /etc/group file contains line 7000 characters.
so it is possible to have a 1000 user in single group
# 2  
Old 11-12-2008
I'm not sure what you are asking - /etc/group is supposed to be limited to LINE_MAX bytes per line. So LINE_MAX bytes can be used to describe users in the group. Check your man page.
Code:
getconf LINE_MAX

shows your system's value for this.

The record layout is:
Code:
group_name:passwd:GID:user_list

where user_list is a comma delimited list of user names in the group.

Where does 1000 come in? LINE_MAX and username length (plus a comma) are the limiting factors. 7000 bytes in a line and 5 character usernames (if allowed) will give 1000+.

Last edited by jim mcnamara; 11-12-2008 at 11:11 AM..
# 3  
Old 11-13-2008
There is no limit on the number of users in a primary group. The limit of LINE_MAX applies to each secondary group. It is not necessary or advisible to list any users primary group in /etc/group .
Though not tried on Red Hat, I have seen multiple lines for the same group in /etc/group in a very large unix SVR4 system.
# 4  
Old 11-13-2008
Quote:
Originally Posted by methyl
There is no limit on the number of users in a primary group. The limit of LINE_MAX applies to each secondary group. It is not necessary or advisible to list any users primary group in /etc/group .
Though not tried on Red Hat, I have seen multiple lines for the same group in /etc/group in a very large unix SVR4 system.
I have seen the same thing:
realgrp::123:user1,user2
dummy1::123:user3,user4
dummy2::123:user5,user6

All six users are in group 123. And when group 123 is translated, it comes out as "realgrp".
# 5  
Old 11-15-2008
Quote:
Originally Posted by jim mcnamara
I'm not sure what you are asking - /etc/group is supposed to be limited to LINE_MAX bytes per line. So LINE_MAX bytes can be used to describe users in the group. Check your man page.
Code:
getconf LINE_MAX

shows your system's value for this.

The record layout is:
Code:
group_name:passwd:GID:user_list

where user_list is a comma delimited list of user names in the group.

Where does 1000 come in? LINE_MAX and username length (plus a comma) are the limiting factors. 7000 bytes in a line and 5 character usernames (if allowed) will give 1000+.
We are adding 1000 users having secondary group. After adding 1000 users, Line of secondary group contains 7053 characters.

Is there any way to change LINE_MAX value of OS ???
Currently LINE_MAX value is 2048.

Thanks in advance...
# 6  
Old 06-16-2009
You don't need the dummy group names.
You can have multiple lines for the same group.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Group Multiple Lines on SINGLE line matching pattern

Hi Guys, I am trying to format my csv file. When I spool the file using sqlplus the single row output is wrapped on three lines. Somehow I managed to format that file and finally i am trying to make the multiple line on single line. The below command is working fine but I need to pass the... (3 Replies)
Discussion started by: RJSKR28
3 Replies

2. Programming

Sql ORA-00937: not a single-group group function

I'm trying to return only one row with the highest value for PCT_MAX_USED. Any suggestions? When I add this code, I get the ORA-00937 error. trunc(max(decode( kbytes_max, 0, 0, (kbytes_alloc/kbytes_max)*100))) pct_max_used This is the original and returns all rows. select (select... (3 Replies)
Discussion started by: progkcp
3 Replies

3. UNIX for Dummies Questions & Answers

Split files into smaller ones with 1000 hierarchies in a single file.

input file: AD,00,--,---,---,---,---,---,---,--,--,--- AM,000,---,---,---,---,---,--- AR, ,---,--,---,--- AA,---,---,---,--- AT,--- AU,---,---,--- AS,---,--- AP,---,---,--- AI,--- AD,00,---,---,---, ,---,---,---,---,---,--- AM,000,---,---,--- AR,... (6 Replies)
Discussion started by: kcdg859
6 Replies

4. Red Hat

User is a Part of a Group But Group Details Do Not Show the User

Hi, In the following output you can see the the user "richard" is a member on the team/group "developers": # id richard uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers) but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies

5. Ubuntu

Create New User with the same group nd privileges of the other user

Hi, Anyone can help me on how to duplicate privileges and group for useroradb01 to userrootdb01. I have currently using "useroradb01" and create a newly user "userrootdb01". I want both in the sames privileges and group. Please see the existing users list below; drwxr-xr-x 53 useroradb01... (0 Replies)
Discussion started by: fspalero
0 Replies

6. UNIX for Advanced & Expert Users

Merge a group of lines into single line

Hi Everybody, Below are the contents of the a text file .., SN = 8 MSI = 405027002277133 IKVALUE = DE6AA6A11D42B69DF6398D44B17BC6F2 K4SNO = 2 CARDTYPE = SIM ALG = COMP128_3 SN = 8 MSI = 405027002546734 IKVALUE = 1D9F8BAA73973D8FBF8CBFB01436D822 K4SNO = 2 CARDTYPE = SIM ALG =... (8 Replies)
Discussion started by: prasanth_babu
8 Replies

7. UNIX for Dummies Questions & Answers

Restoring a single file from a group of files using tar

Hello I take a backup using the following command on Solaris 9 tar cvf /dev/rmt/0n data the data volume contains a number of files say a, b, c , d ... etc Now I want to restore only one file (eg b) from the data volume. When I issue the command tar xvf /dev/rmt/0n data/b... (1 Reply)
Discussion started by: rahmantanko
1 Replies

8. UNIX for Dummies Questions & Answers

How many user can be added to single group

Hi There, How many user can be added to a unix single group. I need this for unix and solaris. BRs -----Post Update----- I'm asking about secondary group and not primary group. All the users are having 8 character as their username. value is set for getconf LINE_MAX is... (1 Reply)
Discussion started by: maestromani
1 Replies

9. UNIX for Dummies Questions & Answers

single user mode - user accounts passwords

hello ppl, someone must be able to help with this --> I have an old NCR tower 32 with an ADDS terminal running a unix version 020102 (Im not sure if thats correct but its unix for sure). I have no user names and no passwords and need to login to read a tape. Is there any way to do that? I hear... (3 Replies)
Discussion started by: orestis
3 Replies

10. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
Login or Register to Ask a Question