Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!spool.mu.edu!usenet.eel.ufl.edu!news.mathworks.com!newsfeed.internetmci.com!uwm.edu!math.ohio-state.edu!usc!sdd.hp.com!col.hp.com!canyon.sr.hp.com!news
From: Darryl Okahata <darrylo@sr.hp.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: How to restore /etc/passwd?
Date: 24 Aug 1996 19:25:50 -0700
Organization: Hewlett Packard Sonoma County
Lines: 69
Sender: darrylo@rylla.sr.hp.com
Message-ID: <vwwwyo6vyp.fsf@rylla.sr.hp.com>
References: <4vo78r$4hje@news-s01.ny.us.ibm.net>
NNTP-Posting-Host: rylla.sr.hp.com
To: reyes01@ibm.net
reyes01@ibm.net writes:
> In preparation to installing 2.15 I backed up /usr/home, /root, and
> the /etc/passwd file. After the installation I tried restoring /etc/passwd
> and nothing happened. The rest of the files restored fine. Is it possible
> to restore /etc/passwd or is it always in use by the OS? There must
> be a way since vipw makes changes to it.
Passwords are not stored in /etc/passwd (unlike older BSD-based
Unices). From the passwd(5) man page:
-------------------------------------------------------------------------------
FILES
/etc/passwd ASCII password file, with passwords removed
/etc/pwd.db db(3)-format password database, with passwords re-
moved
/etc/master.passwd ASCII password file, with passwords intact
/etc/spwd.db db(3)-format password database, with passwords in-
tact
-------------------------------------------------------------------------------
You do have backups, I trust.
> Afterwards I also thought that I should do an adusser (from sysinstall) to
> create the UID(?) and the groups. If I was to want to have a comprehensive
> backup what system files would I need besides passwd?
Looking at /etc/, here's what comes to mind (I'm sure that it is
INCOMPLETE):
/etc/master.passwd # You can rebuild the the passwd
# databases using a copy of this
# file and vipw.
/etc/group
/etc/sysconfig
# and any local startup directories mentioned in /etc/sysconfig
/etc/rc.local # If any
/etc/XF86Config # If any
Here are other files (I believe most of these are properly handled by
the installation program during an upgrade):
/etc/crontab # Depends on your setup
/etc/gettytab # Depends on your setup
/etc/host.conf # Depends on your setup
/etc/hosts # Depends on your setup
/etc/hosts.equiv # Depends on your setup
/etc/inetd.conf # Depends on your setup
/etc/localtime # Depends on you installed/upgraded
/etc/magic # Depends on your setup
/etc/modems # Depends on your setup
/etc/motd # Depends on your setup
/etc/namedb/* # Depends on your setup
/etc/phones # Depends on your setup
/etc/ppp/* # Depends on your setup
/etc/printcap # Depends on your setup
/etc/resolv.conf # Depends on your setup
/etc/sendmail.cf # Depends on your setup
/etc/services # Depends on your setup
/etc/shells # Depends on your setup
/etc/syslog.conf # Depends on your setup
/etc/ttys # Depends on your setup
-- Darryl Okahata
Internet: darrylo@sr.hp.com
DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Hewlett-Packard, or of the
little green men that have been following him all day.