[KLUG Members] Re: Password for root

Dirk Bartley members@kalamazoolinux.org
22 Feb 2003 09:10:42 -0500


On Sat, 2003-02-22 at 08:12, Bruce Smith wrote:
> > Help!  I've forgotten my password for root. How do I go about getting it
> > back? Running RH 8.0
> 
> Reinstall.  No wait, that's windows.  :-)
> 
> Boot up a standalone Linux system on CD or floppy (tomsrootbt, knoppix,
> demo linux, linuxcare bbc, hpa's superrescue, ....)  mount your root
> filesystem, and manually edit /etc/passwd and/or /etc/shadow.

Another way would be to boot up into single user mode.  Assuming you are
using grub for your boot loader, the procedure goes something like so:
(from memory)
When booting, the grub splash screen comes up giving options of which
operating system or kernel to boot from.  Follow directions on the
screen which I think is by typing an E to edit the configuration, or
maybe you may have to press an up arrow or something to let it know you
want to interact with it first.  Then when you select the kernel to edit
it will come up with a couple of different lines to edit (three if
memory serves me).  Edit the line with the word kernel in it and place
the word "single" at the end of it by editing it.  Then go ahead and
follow directions to boot.

The system will come up but stop and give you a "#" prompt before
starting all of the services.  Then use the "passwd" command to change
the root password.  Type exit or ctrl-d to exit the prompt and the
services should then start.  Log in as root to test the new password.

Dirk

> 
> --------------------------------------------
> Bruce Smith                bruce@armintl.com
> System Administrator / Network Administrator
> Armstrong International, Inc.
> Three Rivers, Michigan  49093  USA
> http://www.armstrong-intl.com/
> --------------------------------------------
> 
> _______________________________________________
> Members mailing list
> Members@kalamazoolinux.org
>