Re: Recovering destroyed /etc/passwd from /etc/shadow?
From: 2Host.com - Robert (admin_at_-NOSPAM-2host.com)
Date: 05/24/03
- Previous message: Michael Erskine: "Re: Islam hacks Vatican? Let's Not Be Sentimental!"
- In reply to: NOSPAM: "Recovering destroyed /etc/passwd from /etc/shadow?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 24 May 2003 09:43:49 -0700
NOSPAM wrote:
>
> Hello,
> I managed to destroy my /etc/passwd file (don't ask ;). Is there any
> way to rebuild it with /etc/shadow (which is still intact)??
> Thanks,
> harold
Do you have any recent backup of this file? If not, depending on the
number of users, it may take some time, but this is easy to accomplish.
I assume you still have the group file intact? If so, you have the
user's gid already. If they had the same uid and gid, then it'll be a
lot easier. If not, you can either manually check the uid of their
account's files (assuming they are correct--they should be) or write a
quick script to let you know what user has what uid for their file
ownership(s). Then, backup your files at least once a week, if not daily
and have a master backup somewhere too--for future reference/use.
-- Regards, Robert McGregor - Email: admin@(remove)2host.com. Phone: 530-941-0690 Server admin, support, programming for shared & dedicated web servers Secure, reliable hosting you expect and deserve! http://www.2host.com
- Previous message: Michael Erskine: "Re: Islam hacks Vatican? Let's Not Be Sentimental!"
- In reply to: NOSPAM: "Recovering destroyed /etc/passwd from /etc/shadow?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|