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

What is the difference between command ‘ping’ and ‘ping6’?

1031


Write a command that will do the following: -look for all files in the current and subsequent directories with an extension c,v -strip the,v from the result (you can use sed command) -use the result and use a grep command to search for all occurrences of the word orange in the files.

1324


Which of the commands will replace all occurrences of the word rate with the word speed in the file racing?

1020


What does sh do in linux?

911


What is the difference between locating and locate command?

927


What is the programming language for linux?

1120


What does && mean in bash?

999


Explain difference between nfs soft and hard mouniting points?

894


what is the fastest way to enter a series of commands from the command-line in linux

997


What is tty in linux command?

972


What is a ulimit in unix?

986


How do you create a text file in linux?

1069


What are the basic command in linux?

1009


What are the basic commands in command prompt?

1046


What is the command to delete a file linux?

993