*BSD News Article 26642


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!yoyo.aarnet.edu.au!news.adelaide.edu.au!gateway.dircsa.org.au!apanix!cleese.apana.org.au!cleese.apana.org.au!not-for-mail
From: newton@cleese.apana.org.au (Mark Newton)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Corrupt password files help needed.
Date: 29 Jan 1994 15:13:52 +1030
Organization: cleese.apana.org.au public access UNIX +61-8-3736006
Lines: 26
Distribution: world
Message-ID: <2icpim$j9p@cleese.apana.org.au>
References: <759514992snz@hactar.demon.co.uk>
NNTP-Posting-Host: cleese.apana.org.au

In article <759514992snz@hactar.demon.co.uk> alan@hactar.demon.co.uk writes:
>Hi,
>
>Due to what I will freely admit is my own stupidity I have managed to
>corrupt all the password files, ie passwd, master.passwd, pwd.db and
>spwd.db. I've managed to get back into the system by booting from the
>distribution disks and mounting the drive. I can then rename the rc
>and rc.local files so that the machine boots to a prompt. With rc and
>rc.local I get the login prompt, but cant login! I've tried copying
>files from another system, it didn't help. Of course I cant run
>anything to update the files because you need to be root :(

If you press ^\ while fsck is checking your filesystems at boot time,
you'll be dropped into a root shell as soon as  the checks are completed.

Alternatively, ^C during the checks will give you a root shell immediately.

Once you've done that, you can replace your passwd and master.passwd files
and run pwd_mkdb to update the other files.

   - mark
-- 
--------------------------------------------------------------------
I tried an internal modem,                newton@cleese.apana.org.au
     but it hurt when I walked.                          Mark Newton
----- Voice: +61-8-3735575 --------------- Data: +61-8-3736006 -----