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