Using Knoppix to remove the GRUB Boot Loader password and reset the
root password on Redhat
grub can be password protected so that you can't add a kernel parameter
to boot to single user mode, this makes it difficult to reset the root
password or pass custom parms to the kernel.
Fortunately Knoppix http:// can be used to work around these issues
Booting Knoppix
Insert CD into CDROM and reboot computer (Make sure the BIOS is
configured to boot from the CD before the Hard Disk)
Boot into Knoppix
I think Knoppix will find and mount, or at least enter the current
Linux hdd partitions in /etc/fstab with mount points in /mnt/hdXX, but
you may have to remount the shares as rw before editing the files as
below.
i.e
mount /mnt/hda2 -o remount rw
You need to know where your /boot partition and your / (root)
partitions are.
Mine where /dev/hda1 and /dev/hda2 respectively and hence had mount
points of /mnt/hda1 and /mnt/hda2 from within knoppix
Remove the Grub Boot Loader password option
vi /mnt/hda1/grub/menu.lst
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
# comment the password line out
# password --md5
$1$NnuIG0$82jbm.Z46rbeoNp6t3kX2/
title Fedora Core (2.6.3james1)
root (hd0,0)
kernel /vmlinuz-2.6.3james1
ro root=/dev/hda2 hdc=ide-scsi rhgb
initrd
/initrd-2.6.3james1.img
Blank the root password
To blank the root password you need to remove the 2nd field from the
root line in /etc/shadow
vi /mnt/hda2/etc/shadow
root line before
root:$1$rjeuJQy9$XK.83dj1kAFl9yT9w.44c1:12486:0:99999:7:::
root line after
root::12486:0:99999:7:::
Save the edit, run /sbin/shutdown -r now, (remove the knoppix cd)
Log in as root with no password and reset the password