Bug 5632 - Update...problem with useradd
Summary: Update...problem with useradd
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: usermode
Version: 5.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact:
URL: http://www.massachusetts.net/~tom/use...
Depends On:
TreeView+ depends on / blocked
Reported: 1999-10-06 15:05 UTC by tom
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-10-07 19:20:44 UTC

Attachments (Terms of Use)

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.

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