useradd : unable to lock passwd file

Discussion in 'Open Source' started by asdfgh2, Jun 24, 2007.

Thread Status:
Not open for further replies.
  1. asdfgh2

    asdfgh2 New Member

    Joined:
    Jan 12, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    when iam creating user using useradd

    it prompts an error


    unable to lock passwd file
     
  2. praka123

    praka123 left this forum longback

    Joined:
    Sep 7, 2005
    Messages:
    7,513
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    -
    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
     
  3. OP
    asdfgh2

    asdfgh2 New Member

    Joined:
    Jan 12, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    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
     
  4. praka123

    praka123 left this forum longback

    Joined:
    Sep 7, 2005
    Messages:
    7,513
    Likes Received:
    24
    Trophy Points:
    0
    Location:
    -
    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
     
    Last edited: Jun 24, 2007
  5. sashijoseph

    sashijoseph New Member

    Joined:
    Oct 9, 2006
    Messages:
    314
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Jamshedpur
    Hey look in your /etc/passwd ..... there should be some lock files... passwd.lock etc.Delete them,restart and get going.
     
  6. OP
    asdfgh2

    asdfgh2 New Member

    Joined:
    Jan 12, 2007
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    thaks for ur reply

    i have deleted /etc/passwd.lock file

    now its working
     
Thread Status:
Not open for further replies.

Share This Page