On Wed, Feb 25, 2004 at 03:30:36PM -0600, Luis Guzmán wrote:

> I upgraded my server from FreeBSD 4.6.2 to version 4.8. After this, my passwd file 
> was empty and my master.passwd was gone! I have a backup of these files and now I 
> need to rebuild my users database. Is there a way to do this from my old files? I 
> also need them for my SMB network.

Copy your backup master.passwd file to /etc/master.passwd and then run:

    # pwd_mkdb /etc/master.passwd

which will rebuild the password database, including the /etc/passwd file.  

Nb. If you upgraded your system using the install media, what it will
have done is essentially write over your original system with the
updated files.  That includes giving you a fresh set of the default
versions of the files under /etc -- it will backup your original
settings for you, but you're going to have to merge those files with
the new ones under /etc.  This includes particularly such files as
/etc/group, /etc/login.conf, /etc/make.conf, your PPP configuration
(if you're using PPP) and any other files you've customised.  You may
find the following commands useful if you need to restore the group or
login.conf files:

    # cap_mkdb /etc/login.conf
    # cap_mkdb /etc/group

(It does no harm to run those if you're not sure whether you need to
or not.)



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to