In my linux machine, i lost /etc/passwd file
and /etc/shadow file, then how can i recover it?
Answer Posted / venkat
Normally in linux we must have backup by default for
/etc/passwd and /etc/shadow files
/etc/passwd ---> /etc/passwd-
/etc/shadow ---> /etc/shadow-
from there we can copy or restore. If both are not available.
Then follow below steps:
1. reboot
2. Single user mode [ single init=/bin/bash ]
3. pwconv
4. check /etc/passwd and /etc/shadow files are there
5. sync
6. init 3 or reboot with init 3
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What does free command do in linux?
What is grep command?
How do I check storage on linux?
How do you copy in linux terminal?
Explain the ‘ls’ command in linux
What does chmod do in linux?
Why is it called bash?
Brief about the command nn?
What is help command in linux?
How do I clear my run history?
What does umask 077 mean?
How do I find my user id in linux?
I am using RedHat 6.3 in I wanna to install and configure zimbra mail. Can anybody tell me what are the RPM packages required for zimbra mail ? Where can I get those RPM packages ?
What daemon is used for scheduling of the commands?
Suppose you try to delete a file using the rm command and the deletion fails. What could be the possible reason?