Bug 7542

Summary: adduser breaks putting multiple users into one group
Product: [Retired] Red Hat Linux Reporter: Dale Lovelace <dale>
Component: shadow-utilsAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-12-03 15:20:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dale Lovelace 1999-12-03 15:14:08 UTC
After addind _many_ users to a single group adduser will stop appending the
new user to the end of the line in /etc/group and will start putting a new
line in after each user.

This script will show you the problem:

for i in `cat /usr/dict/words` ; do adduser -G users $i ; done

the "users" line in /etc/group will look like this:

users:x:100:user1, user2, user3, user4, user5, etc, etc, wholalottusers
,nextuser
,nextuser
,nextuser
,nextuser

  Adding each word in the dictionary will get to the C's before it starts
this behavior, so it takes a few hours. Adding a user manually through
Linuxconf while your adduser script is running will hurry the process
though.

Comment 1 Dale Lovelace 1999-12-03 15:20:59 UTC
Woops, didn't see bug 3809...

*** This bug has been marked as a duplicate of 3809 ***