Root password is lost and cannot log in to SSH/WHM to reset it.
You can reset the password by logging into the single user mode
Booting in single mode from GRUB:
– Reboot the system and wait for the GRUB screen to appear
– Highlight the kernel version you’re currently using (usually the newest version) from the GRUB list
– Press “e” to be taken to the boot commands edit screen, highlight the line which starts with kernel and press “e” again
– Add “single” to the end of the line, so it will look like this:
kernel /vmlinuz-kernel-version ro root=LABEL=/ rhgb quiet single
– Press “Enter” to save the changes
– Press “b” to boot in single user mode.
Your system will begin loading and, at some point, you will be presented with a root bash prompt.
– In the new prompt type passwd and choose a new password for root.
– When done, type reboot to restart the system. After reboot,
GRUB will be back to normal so no further modifications are required.
NOTE: If you are asked for the root password before dropping you in a bash prompt in single user mode, you should follow the instructions above and append single init=/bin/bash to the kernel line, not just single.
Booting in single mode from LILO
– Reboot the system and wait for the LILO screen to appear
– When you see the boot: prompt, type linux single to boot into single user mode
– Once the system has booted, you will be dropped into a bash prompt where you will have to type passwd to set a new password for root.
– Type reboot to restart the system and get everything back to normal.
NOTE: If you are asked for the root password before dropping you in a bash prompt in single user mode, you should follow the instructions above and type linux init=/bin/bash instead of linux single.
If this does not work then you will have to contact your host.