Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Is a command a full sentence?

1060


What are the options of wc command?

1040


What does df command do in linux?

1125


You issue the command head * what would the resulting output be?

968


What does rmdir do in linux?

973


What is df command in linux?

1022


You have a tab delimited file called phonenos and want to change each tab to four spaces. What command can you use to accomplish this?

1049


What is command to check ports running/used over local machine

1138


What is clang format?

1002


How do I move to root in linux?

1154


How to hide the partition in grub booting?

1078


If the programmer wishes to execute an instruction at the specified time. Which command is used?

1425


What the command used for list the contents of your home directory, current directory and all subdirectories?

956


How can you check the amount of lines in a file?

986


How do I know my linux shell version?

1083