Recovering \etc\passwd file in linux

Scenario: When you accidently deleted the /etc/passwd file, user unable to login in their home directory or the authentication fails.


  1. If you deleted the file and you have not restarted your server simply go to /etc directory and do the syntax

               #cp passwd-  passwd

       2.       If you have restarted the server and you came to know the passwd file is missing; restart the server in single user mode and do the same as mentioned in point 1 (#cp passwd-  passwd)

Note: passwd- is a backup file of passwd file.


2 Responses to Recovering \etc\passwd file in linux

  1. shyam kumar says:


    Thanks a lot for the information .

    But after deleting the passwd file , i rebooted the system and iam not able to login system.

    I tried to login single usermode but no luck.

    Could you please tell me what to do in such suitation.

    • Can you please boot through live cd and rename the password file

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: