Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!inferno.mpx.com.au!news.ci.com.au!brian.telstra.net!act.news.telstra.net!news-out.internetmci.com!newsfeed.internetmci.com!feed1.news.erols.com!news.nl.innet.net!INnl.net!feed1.news.innet.be!INbe.net!stns.news.pipex.net!warm.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.utell.co.uk!usenet From: brian@shift.utell.net (Brian Somers) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Help: password db corrupt Date: 30 May 1997 16:58:31 GMT Organization: Awfulhak Ltd. Lines: 34 Message-ID: <5mn0vn$8kq@ui-gate.utell.co.uk> References: <5mmqub$g2m@news.interlog.com> Reply-To: brian@awfulhak.org, brian@utell.co.uk NNTP-Posting-Host: shift.utell.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Newsreader: knews 0.9.8 Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:41921 In article <5mmqub$g2m@news.interlog.com>, patrick@interlog.com (Patrick McConnell) writes: > I guess I've done something stupid, and now my password database is > corrupt. I believe what happened was I over-wrote the /etc/pwd.db file. > I tried restoring it with the pwd_mkdb command, but it just gives me an > error. Then I deleted all the related files (/etc/passwd, > etc/master.passwd, /etc/pwd.db, /etc/spwd.db), and tried again with > pwd_mkdb. I can get into the system by using -s at the boot: prompt then > mounting the file systems manually. I've tried adduser, which gives me > the same error as pwd_mkdb, and I've tried setting the root password > with the install boot disk. I still have the original copy of the passwd > file, but it's not much good to me ... > > Ok, so if you're finished laughing, does anyone have any suggestions? Pant pant (wipes smirk from face). Hate that ! master.passwd is the original - the reset are derivations. You should have a copy of master.passwd in /var/backups. Do a "mount -a -u -t nonfs" and copy it to /etc. Then do a "pwd_mkdb master.passwd" to create *pwd.db and do a "vipw" and a :wq to create your passwd file. You may not even need the pwd_mkdb step. > Thanks, > > Patrick > -- Brian <brian@awfulhak.org> <brian@freebsd.org> <http://www.awfulhak.org> Don't _EVER_ lose your sense of humour !