Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 5632

Summary: Update...problem with useradd
Product: [Retired] Red Hat Linux Reporter: tom
Component: usermodeAssignee: Michael K. Johnson <johnsonm>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-10-07 19:20:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description tom 1999-10-06 15:05:44 UTC
Your little window is going to screw up the log lines but
here goes...

I have a real problem with useradd.
I have a list of over 2100 users I need to add in one shot.
The script I setup uses the useradd program. It doesn't
start the UID's at 500 like
it says to in /etc/login.defs

	# Min/max values for automatic uid selection in
	UID_MIN                   500
	UID_MAX                 60000

man useradd says it uses those settings to chose UID's

OK, Here is where things get weird. useradd starts UID's at
and moves up to 499 then starts over at 15. What the hell is
Then it adds users till it hits 99 then yacks no more

While I add users here is the messages log...

Oct  6 10:36:36 orion useradd[13936]: new user: name=cti,
uid=495, gid=100, home=/home/users/cti, shell=/bin/bash
Oct  6 10:36:37 orion useradd[13937]: new user:
name=infonet, uid=496, gid=100, home=/home/users/infonet,
Oct  6 10:36:37 orion useradd[13938]: new user:
name=esquire, uid=497, gid=100, home=/home/users/esquire,
Oct  6 10:36:38 orion useradd[13939]: new user: name=dkmj,
uid=498, gid=100, home=/home/users/dkmj, shell=/bin/bash
Oct  6 10:36:38 orion useradd[13940]: new user: name=ricky,
uid=499, gid=100, home=/home/users/ricky, shell=/bin/bash
Oct  6 10:36:38 orion useradd[13941]: new user:
name=pondhome, uid=15, gid=100, home=/home/users/pondhome,
Oct  6 10:36:39 orion useradd[13942]: new user: name=brianb,
uid=16, gid=100, home=/home/users/brianb, shell=/bin/bash
Oct  6 10:36:39 orion useradd[13943]: new user:
name=getsales, uid=17, gid=100, home=/home/users/getsales,
Oct  6 10:36:40 orion useradd[13944]: new user:
name=gethelp, uid=18, gid=100, home=/home/users/gethelp,
Oct  6 10:36:40 orion useradd[13945]: new user: name=p84,
uid=19, gid=100, home=/home/users/p84, shell=/bin/bash
Oct  6 10:36:40 orion useradd[13946]: new user: name=tisay,
uid=20, gid=100, home=/home/users/tisay, shell=/bin/bash
Oct  6 10:36:41 orion useradd[13947]: new user:
name=dmardis, uid=21, gid=100, home=/home/users/dmardis,


Oct  6 10:37:39 orion useradd[14021]: new user: name=lapere,
uid=95, gid=100, home=/home/users/lapere, shell=/bin/bash
Oct  6 10:37:41 orion useradd[14022]: new user: name=rac1,
uid=96, gid=100, home=/home/users/rac1, shell=/bin/bash
Oct  6 10:37:42 orion useradd[14023]: new user: name=greg,
uid=97, gid=100, home=/home/users/greg, shell=/bin/bash
Oct  6 10:37:43 orion useradd[14024]: new user:
name=jlovell, uid=98, gid=100, home=/home/users/jlovell,

The output from useradd once it hits UID 98...

useradd: can't get unique uid
useradd: can't get unique uid
useradd: can't get unique uid
useradd: can't get unique uid
useradd: can't get unique uid
useradd: can't get unique uid

The command line I use... Has the passwords snipped from
another Unix system.

useradd-m -n -r pammy -p
useradd -m -n -r stardust -p
useradd -m -n -r cent21 -p
useradd -m -n -r mark -p
useradd -m -n -r robertf -p
useradd -m -n -r n1rby -p
useradd -m -n -r nasus -p
useradd -m -n -r luck -p

Please, What's going on?

This is a new RH5.2 install.
The password file was empty except for the basic system
I've run all the nessary updates from RH's updates ftp site.

Comment 1 tom 1999-10-06 15:09:59 UTC
Here is a URL to a readable version of
what I posted. The web based tool for posting chopped my lines :(

Comment 2 Michael K. Johnson 1999-10-07 19:20:59 UTC
-r adds a system account, one with an id lower than 500.
useradd is doing exactly what you asked it to, according
to the manual page.