Subject: Re: No more root login?
To: The Great Mr. Kurtz [David A. Gatwood] <davagatw@mars.utm.edu>
From: Bill Studenmund <wrstuden@loki.stanford.edu>
List: port-mac68k
Date: 01/14/1997 21:41:55
> 
> On Wed, 15 Jan 1997, noud de brouwer wrote:
> 
> > >login: root
> > >Login incorrect
> > 
> > /etc/passwd and friends is in etc12.tar.gz
> > restalling that package might help..
> > 
> > but does destroy changes you made in /etc. if so and
> > if you've got MacOS at hand, use a tar program for etc12.tar.gz
> > and in the installers mini console cpin passwd, master.passwd,
> > pwd.db and spwd.db
> 
> Or, if passwd and master.passwd aren't creamed, you can just vipw, make
> some insignificant change to a user's full name or something, and :w
> and :q out of the thing, and rebuild the databases.  Boot single user and
> use mount -u / to mount the root partition read-write so that you won't
> have to use the login -- that is, of course, unless you changed /etc/ttys
> to mark the console as insecure....
> 
> Hope that helps,

David's fix should do it (unless you marked the console insecure, which
means ask for a password before booting single user, which won't
work... cpout /etc/ttys with the installer and fix insecure if you did
this, though I bet you didn't).

The problem is that you should use "vipw" to edit the password file,
not vi. It does a few extra things, like some form of locking (I
think), and it re-builds important databases from the file you edited.
By using vi, the file and the compiled database are out of sync.

Also note that the NetBSD password entries have extra fields, compared to
other UNIXs. :-)

Good luck,

Bill