"Joseph S. D. Yao" <jsdy @
cospo .
osis .
gov> wrote:
> > Date: Fri, 19 Jul 1996 10:21:09 -0600
> > From: Geoff Mulligan <geoff @
mulligan .
com>
> > Subject: Re: [HELP] I lost root password!
> ...
> > Here is the cookbook method to remove the root password:
> ...
> > 5. Once the drive is mounted type:
> > ed /mnt/etc/shadow
> > /^root:/c
> > root:::::::
> > .
> > w
> > q
>
> Oh, no!!!! Do you really want to eliminate user ID, group ID,
> description (not particularly useful, but ...), home directory and
> shell??????
This is the shadow file not the password file that is being edited.
user id, group id, gecos field, home dir and shell are NOT stored in
this file.
> A better set of 'ed' commands to use if you just want to (*shudder*)
> eliminate the root password is:
> s/^\([^:]*:\)[^:]*/\1/
> w
> q
> or, much better, to replace it with another encrypted password whose
> unencrypted value you know:
> s/^\([^:]*:\)[^:]*/\1encryptedpasswd/
> w
> q
We running in single user mode! Why shudder about removing the root
password. After removing the root password just reboot into single user
mode and set the password. These other ed commands are just much too
complicated.
geoff
References:
|
|