How to reset the root password on Linux using GRUB.

Sergio's picture

Remember: EVERYTHING that you can read on this page - you will do on your own risk. There is no way I'm responsible for any type of damage or data lost in the case if you will use the material published in this Tutorial.

1) Enter GRUB. You can do so by HOLDING "Shift" after the POST or "Power-On Self Test". It means - the first moments or screen blinks on boot up.
2) When in GRUB menu press [e] (edit) on the line with your Linux distribution selected.
3) Select the line where you see word "kernel". Usually it's something like "kernel ... ... ro root=LABEL=/ rhgb quiet".
4) Press [e] (edit) again and append to the end of the string "single init=/bin/bash" or "single init=/bin/sh".
5) Press ESC to go back to the previous menu.
6) Press [b] to boot the selected kernel.

Note: You can use "init=/bin/sh" or "init=/bin/bash" or any other Linux/Unix shell like "/bin/ksh", if it's installed.