LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to recover /etc/passwd file (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-recover-etc-passwd-file-801358/)

narayanapalla 04-11-2010 09:50 AM

how to recover /etc/passwd file
 
hi
unfortunately i lost my passwd file...
so who to recover that

thanks in advavance

pixellany 04-11-2010 09:58 AM

That file contains a lot of entries specific to an installation, so I'm not sure what you can do.

You could try photorec, but I think you will need to be running from a different OS on another partition.

Mara 04-11-2010 10:20 AM

Moved: This thread is more suitable in Linux-Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.

Mara 04-11-2010 10:23 AM

Some user names you may recover from /etc/shadow. Passwords aren't kept in /etc/passwd, so there's one problem less.

However, it may be the best idea to copy /etc/passwd from a different installation of your distribution to have the user names and their ids. Then you just need to add the users you've added on your own.

marygtz43 04-12-2010 12:31 AM

I always use to forget my password ....But this is what I learn It depend where you have your password at . For example: At the start of your computer ....If thats the case ..First When you first turn your computer on rite away press F8 that will take you to a restore point and just follow the intruction from there. Good Luck .

Sayan Acharjee 04-12-2010 12:53 AM

Quote:

Originally Posted by narayanapalla (Post 3931774)
hi
unfortunately i lost my passwd file...
so who to recover that

thanks in advavance

There should be a backup of /etc/passwd named /etc/passwd-, copy this file and change its name to /etc/passwd.

pixellany 04-12-2010 07:05 AM

Quote:

Originally Posted by marygtz43 (Post 3932484)
I always use to forget my password ....But this is what I learn It depend where you have your password at . For example: At the start of your computer ....If thats the case ..First When you first turn your computer on rite away press F8 that will take you to a restore point and just follow the intruction from there. Good Luck .

How does that apply here? (OP lost the whole passwd file.)

pixellany 04-12-2010 07:06 AM

Quote:

Originally Posted by sayan_acharjee (Post 3932495)
There should be a backup of /etc/passwd named /etc/passwd~, copy this file and change its name to /etc/passwd.

How about that!!---never saw that before.

TB0ne 04-15-2010 03:46 PM

Quote:

Originally Posted by marygtz43 (Post 3932484)
I always use to forget my password ....But this is what I learn It depend where you have your password at . For example: At the start of your computer ....If thats the case ..First When you first turn your computer on rite away press F8 that will take you to a restore point and just follow the intruction from there. Good Luck .

The OP will need luck, if they follow this advice...F8 is for *Windows* recovery. Doesn't do anything on openSUSE.


All times are GMT -5. The time now is 07:32 PM.