Results 1 to 3 of 3
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-15-2007 #1
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.
- 02-17-2007 #2
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?)
- 02-17-2007 #3
- Join Date
- Feb 2007
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.
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.