LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 10-08-2002, 11:48 AM   #1
debPandra
LQ Newbie
 
Registered: Jul 2002
Posts: 9

Rep: Reputation: 0
Unhappy how to recover /etc/passwd?


hello,
by mistake I deleted all the content of the /etc/passwd. I have red hat 7.2. It uses the /etc/shadow file. I don't know if this could help. Next time I will do a backup of the /etc/passwd file, but now, is there any way to recover the content of that file? i didnt restart the computer yet.

thanks a lot for your reply
Deb
 
Old 10-08-2002, 11:57 AM   #2
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
If you are REALLY lucky you might find an /etc/passwd- there ... if not, have fun
 
Old 10-08-2002, 12:00 PM   #3
debPandra
LQ Newbie
 
Registered: Jul 2002
Posts: 9

Original Poster
Rep: Reputation: 0
the /etc/passwd- is also empty. is there ANY way to recover it?
 
Old 10-08-2002, 12:02 PM   #4
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
At least none I can think of right now ... maybe some rescue software might be possible to do so ... but I doubt it honestly!
 
Old 10-08-2002, 12:05 PM   #5
debPandra
LQ Newbie
 
Registered: Jul 2002
Posts: 9

Original Poster
Rep: Reputation: 0
so... what does that mean? I have to reinstall linux, reinstall all the software? do what?
 
Old 10-08-2002, 12:44 PM   #6
d3funct
Member
 
Registered: Jun 2001
Location: Centralia, WA
Posts: 274

Rep: Reputation: 31
No, it means you have to rebuild your /etc/passwd file. Look in a Redhat linux manual, or maybe someone who has a redhat filesystem handy ( I don't I'm at work with no Linux) can post their /etc/passwd with only the default users listed in it and you can cut and paste it into your /etc/passwd file. Then you'll have to run adduser to rebuild the users on your system and reset their passwords, etc... Whatever you do don't reboot the box until you have a working /etc/passwd or you WILL be re-installing (or at least coming up in single-user mode to re-build /etc/passwd).
 
  


Reply

Tags
how, recover



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
How to recover? Redbone981sl Linux - Software 1 10-04-2005 01:04 AM
recover root passwd red hat 8 simquest Linux - Software 1 09-17-2003 10:21 AM
recover root passwd simquest Linux - Software 1 07-17-2003 10:11 AM
filesystem: recover or not to recover? bdp Linux - General 3 06-06-2003 03:40 AM
recover lakshman Linux - General 1 11-25-2002 08:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 10:02 AM.

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
Open Source Consulting | Domain Registration