LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 04-11-2010, 10:50 AM   #1
narayanapalla
LQ Newbie
 
Registered: Jan 2010
Posts: 8

Rep: Reputation: 0
how to recover /etc/passwd file


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

thanks in advavance
 
Old 04-11-2010, 10:58 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
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.
 
Old 04-11-2010, 11:20 AM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

Rep: Reputation: 149Reputation: 149
Moved: This thread is more suitable in Linux-Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 04-11-2010, 11:23 AM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

Rep: Reputation: 149Reputation: 149
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.
 
Old 04-12-2010, 01:31 AM   #5
marygtz43
LQ Newbie
 
Registered: Apr 2010
Location: California State
Posts: 1

Rep: Reputation: 0
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 .
 
Old 04-12-2010, 01:53 AM   #6
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Bangalore, India
Distribution: Linux Mint 13
Posts: 592

Rep: Reputation: 64
Quote:
Originally Posted by narayanapalla View Post
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.

Last edited by Sayan Acharjee; 04-12-2010 at 09:35 AM.
 
1 members found this post helpful.
Old 04-12-2010, 08:05 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
Quote:
Originally Posted by marygtz43 View Post
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.)
 
Old 04-12-2010, 08:06 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729Reputation: 729
Quote:
Originally Posted by sayan_acharjee View Post
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.
 
Old 04-15-2010, 04:46 PM   #9
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,102

Rep: Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719
Quote:
Originally Posted by marygtz43 View Post
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.
 
  


Reply

Tags
file, passwd, recover


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
recover passwd divyashree Linux - Software 1 10-18-2008 08:36 AM
recover passwd !!! Dr_Death_UAE Solaris / OpenSolaris 4 06-22-2006 10:51 AM
recover root passwd in hpux gsr_kashyap Other *NIX 6 03-02-2006 12:58 AM
recover root passwd simquest Linux - Software 1 07-17-2003 11:11 AM
how to recover /etc/passwd? debPandra Linux - Distributions 5 10-08-2002 01:44 PM


All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration