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

Answer Posted / inam

Recovery of passwd & shadow file

-write on kernel line "init=/bin/bash

-Press enter
-Press b
copy /etc/passwd- /etc/passwd

then use command
pwconf to regenerate shadow from passwd.


u can change password of ur user until u create shadow.

after all these changes just change ur user password with

-passwd username.

( i post one before but it has some mistake)
this opne will work try out

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I run a .sh file in linux?

547


Who whoami linux?

553


What is the use of ls command?

485


What is env command in linux?

507


What does r mean linux?

593






Brief about finger username?

560


What are linux commands useful?

582


What does cd do in linux?

655


How commands work in linux?

512


How do you do nslookup?

529


what is the roles and responsibilities in linux system admin having 2yrs exp..?

3761


How do I check disk space in bash?

491


What is the difference between locating and locate command?

523


Which command would you use if you want to remove the password assigned to a group?

522


How do I clear terminal command history?

560