DIGIT-ARC read-only archive · snapshot: July 23, 2026

useradd : unable to lock passwd file

6 posts · originally from https://geek.digit.in/community/threads/useradd-unable-to-lock-passwd-file.61186/

A
asdfgh2 Original post #1
Jun 24, 2007 at 10:27 AM
when iam creating user using useradd

it prompts an error


unable to lock passwd file
praka123
Jun 24, 2007 at 10:30 AM
useradd is a raw command.which distro are you using.
also you need to be root(admin) user to do that.try as root.
remember useradd needs many things(mostly auto set) like the default /home/user directory,shell,ur details etc etc.there are gui tools available in most modern distros like Debian or Fedora
A
asdfgh2 #3
Jun 24, 2007 at 6:43 PM
thanks for ur reply


iam using redhat 9.0 and iam logged in as user root



but iam getting the same error as " unable to lock passwd file "


what to do
praka123
Jun 24, 2007 at 6:57 PM
this is queit a old distro :( use fedora 7 (redhat's latest version is called fedora)
the tool used if u have GUI GNOME working is "redhat-config-users" i think.infact rh website too have details.
if u want to know more about cmd u can try in terminal "man useradd"
ex usage in cli is like u need to specify ur primary group,secondary groups(wheel),home directory,user details passwd etc
S
Jun 24, 2007 at 7:32 PM
Hey look in your /etc/passwd ..... there should be some lock files... passwd.lock etc.Delete them,restart and get going.
A
asdfgh2 #6
Jun 25, 2007 at 2:56 PM
thaks for ur reply

i have deleted /etc/passwd.lock file

now its working