Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Smile Recovering Linux

    Someone has by mistake deleted my /etc/passwd file and also my /etc/shadow file(The guy didnt know what he is doing). How an i get the system back in a running condition ? Thnx in advance.

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Thankfully, never been in that situation, so I'm not even sure if you'll be able to get to single-user mode. If you can, good; if you can't you'll need a live cd.

    You can probably copy the stock /etc/passwd and /etc/shadow files from the installation cds (I think). After doing so, delete the entire hash for root so that you can at least log in when the machine boots - with a blank password. Change it right away. You're going to have to recreate all your users.

    Make that guy sit in the corner for a long time. (Why in the world did you give him root access?)

  3. #3

    recovering linux passwd and shadow files

    No need of live cd ..just boot into the runlevel 1.
    check by default u will have shadow- and passwd- files these are the backup files of passwd and shadow.
    copy them.
    cp /etc/shadow- /etc/shadow
    cp /etc/passwd- /etc/passwd

    if u cannot find them; (shadow- and passwd-)
    use command "pwconf" or "authconfig" this will create the shadow and passwd files to you.


  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts