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

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?

1014


What are the mv command options?

840


What is the programming language for linux?

1134


How can I check the exit status of my previous command in Linux operating system?

947


Brief about the command kill PID?

1036


How do I find command history in linux?

961


What does (cd dir && command) do?

965


What is $@ in makefile?

949


How to activate / deploy licence in RHEL 6 and what will happen if you don't activate / deploy licence in RHEL 6 ?

2645


What make install does?

896


Which command is used to delete a group?

1086


How do I know my linux shell version?

1000


How do you create a file?

947


Describe the mknod command and when you’d use it.

1051


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

986