In my linux machine, i lost /etc/passwd file
and /etc/shadow file, then how can i recover it?

Answer Posted / rallapalli

Enter into single user mode
$cp /etc/passwd~ /etc/passwd
$cp /etc/shadow~ /etc/shadow

passwd~ and shadow~ are backup files of passwd, shadow

Thanks,

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What the command used for search file or files for specific text?

501


Why is it called bash?

500


What is cd in cmd?

523


What does r mean linux?

597


What is the difference between diff and cmp command in unix?

480






How do you check which file consuming more space in linux?

473


What does rmdir do in linux?

541


What is netstat command in linux?

580


Which command is used to check the number of files and disk space used and the each user’s defined quota?

550


What is df command in linux?

542


Write about an internal command.

596


What does p mean linux?

531


Why we use pwd command in linux?

547


What is cmake in linux?

609


What is the command to calculate the size of a folder?

517