1. Boot server/VM in BIOS mode and change Boot Mode to CD
2. Boot server/VM from Linux CD
3. Hit F5 to enter Rescue Mode.
4. Type: Linux Rescue (at prompt)
5. When asked to mount the filesystem to /mnt/sysimage – choose CONTINUE.
6. Type: cd /mnt/sysimage
7. To reset root password first type:
chroot /mnt/sysimage
8. Type: passwd
Now enter the new root password
9. Unmountt boot CD.
10. Type: “reboot” at system prompt.
11. System should boot normally.
If you need to remove the root password (last resort), type:
chroot /mnt/sysimage
12. Type: vi etc/shadow
13. Delete everything between the colons for root: (see example below)
Before:
root:$1$75ni7tCN$dyTG5e57vBxo7ywJTSvDa0:16029:0:99999:7:::
After:
root::16029:0:99999:7:::