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
You want to copy the user’s home directories to a new location. Which of the following commands will accomplish this?
What is the command can be used to check for file corruption?
How do I find hostname in linux?
Why is linux cpu usage so high?
How to give acl permission in numerical mode on linux?
What is linux load average?
What is a ulimit in unix?
How do I run multiple commands in linux?
What are the ms dos commands?
What are the basic command in linux?
What is cd command used for?
Explain about the command lynx?
What is the example of command sentence?
What is difference between comm and CMP command?
can any one send me one project on linux ...?