Re: Recovering destroyed /etc/passwd from /etc/shadow?

From: 2Host.com - Robert (admin_at_-NOSPAM-2host.com)
Date: 05/24/03

  • Next message: neptuna: "Topology Question"
    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
    

  • Next message: neptuna: "Topology Question"

    Relevant Pages

    • Re: How do I migrate users to new Fedora installation?
      ... make backup copies first ... EDITOR to your preferred editor first. ... They can match on user name instead of UID. ... If you need to preserve the UID and GID, ...
      (Fedora)
    • Re: How do I migrate users to new Fedora installation?
      ... make backup copies first ... EDITOR to your preferred editor first. ... They can match on user name instead of UID. ... webmin Users and Groups module has the ability ...
      (Fedora)
    • Re: This is getting worse
      ... If you used rpm it may be that the ... HOwever a uid of 666 is very suspicious ( ... Remover from net, backup, reinstall, from scratch ... and then check your backups for suid root files. ...
      (comp.security.unix)