*BSD News Article 14240


Return to BSD News archive

Xref: sserve comp.os.386bsd.questions:1465 comp.unix.bsd:11780
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!agate.berkeley.edu!cgd
From: cgd@erewhon.CS.Berkeley.EDU (Chris G. Demetriou)
Newsgroups: comp.os.386bsd.questions,comp.unix.bsd
Subject: Re: Can't logon after running buildworld.sh (patchkit-0.2.2)
Date: 8 Apr 93 09:53:32
Organization: Kernel Hackers 'r' Us
Lines: 32
Message-ID: <CGD.93Apr8095332@erewhon.CS.Berkeley.EDU>
References: <1993Apr6.144035.21705@latcs1.lat.oz.au>
NNTP-Posting-Host: erewhon.cs.berkeley.edu
In-reply-to: wongm@latcs1.lat.oz.au's message of Tue, 6 Apr 1993 14:40:35 GMT

In article <1993Apr6.144035.21705@latcs1.lat.oz.au> wongm@latcs1.lat.oz.au (M.C. Wong) writes:
>  Well, with the initial boot disk, I can stil mount my harddisk on the 
>floppy root file system. But, is there any otherway for me to quicky get 
>myself back into the system ? I tried blanking out the root passwd field
>in passwd and master.passwd file, but they won't do any good, as kvm_mkdb
>has to be invoked to update the system database. Can anyone suggest any
>quick fix without resinstalling 386bsd from scratch ?



boot w/ a floppy root, etc.
mount your normal / on /mnt, your normal /usr on /mnt/usr.
/mnt/usr/sbin/chroot /mnt
pwd_mkdb -p /etc/master.passwd

you can also do anything else you need to while here.
then "exit", cd /, umount /mnt/usr, umount /mnt

sync;sync;reboot




chroot is your friend!


chris
--
Chris G. Demetriou                                    cgd@cs.berkeley.edu

   "386bsd as depth first search: whenever you go to fix something you
       find that 3 more things are actually broken." -- Adam Glass