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
Which of the following tasks cannot be accomplished with the touch command?
How do you save a file in linux?
Is llvm a compiler?
What does uname do in linux?
How can I create a file with cmd?
Explain trap command; shift command, getopts command of linux?
Brief about the command kill PID?
How do I check terminal history?
What does top do in linux?
How do I check my disk space?
What is the gcc command?
What does chmod 777 do?
How do I check cores in linux?
What is echo command in batch file?
Which command is used to clear the screen?