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
Why makefile is used in linux?
How do I find the linux version?
You want to copy the user’s home directories to a new location. Which of the following commands will accomplish this?
How do I stop a linux job?
What are the basic commands in command prompt?
How many types of dos commands are there?
What does rmdir do in linux?
What is command to check ports running/used over local machine
What is Data Command?
What are the mv command options?
Information technology is widely used in
Main configuration file and command used for NFS enabling exported directories and deamons?
What is cd in cmd?
What is df command in linux?
What language is clang written in?