Hacking RedHat Boxes
- 1) Reboot Linux and press a button to go to the grub prompt.
- 2) Edit the command line with 'e' on the first RHEL Line
- 3) Edit the middle line by pressing 'e' again and add to the same line:
init=/bin/bash
- 4) Press 'b' to boot. Make sure its the same line with 'init=/bin/bash'
- 5) Once booted to the # promt, type the following line:
mount -o remount,rw /
- 6) Then type the following to set root password:
passwd root
- 7) Once root password has been changed, type the following to flush the hard drive:
mount -o remount,ro /
- 8) Once the hard drive is flushed, type the following to sync files:
sync
- 9) Once everything is sync, then type the following to reboot:
exit
- 10) Reboot