Red Hat Enterprise Linux Reset Root Password

on Nov. 23, 2014, 12:06 a.m.

On rhel, this is how you reset the root password. Reboot the server
and at the grub boot menu, press tab. This is then give you the option
to edit the current grub config. Press e then highlight the kernel
line and press e again. Add a space to the end of the line and add


Once that is done, press enter and then press b to boot. The
system will now boot up into a read-only single user bash shell.
Once at the shell, run

mount -o remount,rw /

This will remount the filesystem with write permissions. Now run

passwd root

This will allow you to reset the root password. Afterwards, reboot. :)