# useradd : unable to lock passwd file



## asdfgh2 (Jun 24, 2007)

when iam creating user using useradd 

it prompts an error 


             unable to lock passwd file


----------



## praka123 (Jun 24, 2007)

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


----------



## asdfgh2 (Jun 24, 2007)

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)

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


----------



## sashijoseph (Jun 24, 2007)

Hey look in your /etc/passwd ..... there should be some lock files... passwd.lock etc.Delete them,restart and get going.


----------



## asdfgh2 (Jun 25, 2007)

thaks for ur reply 

i have deleted /etc/passwd.lock file

now its working


----------

