Bug 501739 - useradd fails to add an user if its supplementary group already contains many users
useradd fails to add an user if its supplementary group already contains many...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
11
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-20 10:59 EDT by Milos Malik
Modified: 2010-02-04 03:17 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-16 09:57:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2009-05-20 10:59:12 EDT
Description of problem:
The number of successfully added users depends on the length of the user name. If user names look this way "usNNNN", useradd can successfully add more than 1200 users. If user names look this was "userNNNN", useradd can successfully add less than 1000 users.

Maybe there is a problem in /etc/group parsing, because the name of each added user must be appended to the student group record.

Version-Release number of selected component (if applicable):
DISTRO=rawhide-20090519
kernel-2.6.29.3-140.fc11
shadow-utils-4.1.2-13.fc11

How reproducible:
always (reproduced on i386 and x86_64 machines)

Steps to Reproduce:
# groupadd student
# for I in `seq 1000 1 2000` ; do useradd -G student user$I ; if [ $? -ne 0
 ] ; then echo user$I ; fi ; done
useradd: unknown group student
user1962
useradd: unknown group student
user1963
useradd: unknown group student
user1964
useradd: unknown group student
user1965
useradd: unknown group student
user1966
useradd: unknown group student
user1967
useradd: unknown group student
user1968
useradd: unknown group student
user1969
useradd: unknown group student
user1970
useradd: unknown group student
user1971
useradd: unknown group student
user1972
useradd: unknown group student
user1973
useradd: unknown group student
user1974
useradd: unknown group student
user1975
useradd: unknown group student
user1976
useradd: unknown group student
user1977
useradd: unknown group student
user1978
useradd: unknown group student
user1979
useradd: unknown group student
user1980
useradd: unknown group student
user1981
useradd: unknown group student
user1982
useradd: unknown group student
user1983
useradd: unknown group student
user1984
useradd: unknown group student
user1985
useradd: unknown group student
user1986
useradd: unknown group student
user1987
useradd: unknown group student
user1988
useradd: unknown group student
user1989
useradd: unknown group student
user1990
useradd: unknown group student
user1991
useradd: unknown group student
user1992
useradd: unknown group student
user1993
useradd: unknown group student
user1994
useradd: unknown group student
user1995
useradd: unknown group student
user1996
useradd: unknown group student
user1997
useradd: unknown group student
user1998
useradd: unknown group student
user1999
useradd: unknown group student
user2000
  
Actual results:
some users are added, some are not

Expected results:
all users are added
Comment 2 Peter Vrabec 2009-06-09 04:26:56 EDT
The problem is that the buffer that stores student group structure is not big enough.
Current setting 
xgetgrnam.c:#define MAX_LENGTH  0x8000

I have asked upstream, if it would be possible to adjust to value.
Comment 3 Bug Zapper 2009-06-09 12:10:40 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 4 Peter Vrabec 2009-06-16 09:57:37 EDT
fixed in shadow-utils-4_1_4_1-1_fc12

Note You need to log in before you can comment on or make changes to this bug.