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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
04-11-2010, 09:50 AM
|
#1
|
|
LQ Newbie
Registered: Jan 2010
Posts: 8
Rep:
|
how to recover /etc/passwd file
hi
unfortunately i lost my passwd file...
so who to recover that
thanks in advavance
|
|
|
|
04-11-2010, 09:58 AM
|
#2
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
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.
|
|
|
|
04-11-2010, 10:20 AM
|
#3
|
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,470
Rep: 
|
Moved: This thread is more suitable in Linux-Newbie and has been moved accordingly to help your thread/question get the exposure it deserves.
|
|
|
|
04-11-2010, 10:23 AM
|
#4
|
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,470
Rep: 
|
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.
|
|
|
|
04-12-2010, 12:31 AM
|
#5
|
|
LQ Newbie
Registered: Apr 2010
Location: California State
Posts: 1
Rep:
|
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 .
|
|
|
|
04-12-2010, 12:53 AM
|
#6
|
|
Member
Registered: Feb 2010
Location: Bangalore, India
Distribution: Fedora, Linux Mint 10
Posts: 588
Rep:
|
Quote:
Originally Posted by narayanapalla
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 08:35 AM.
|
|
|
1 members found this post helpful.
|
04-12-2010, 07:05 AM
|
#7
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
Quote:
Originally Posted by marygtz43
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.)
|
|
|
|
04-12-2010, 07:06 AM
|
#8
|
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,797
|
Quote:
Originally Posted by sayan_acharjee
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.
|
|
|
|
04-15-2010, 03:46 PM
|
#9
|
|
Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 11,788
|
Quote:
Originally Posted by marygtz43
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:30 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|