Resetting the root user password
In this post, I will share a simple way of resetting the root user password within a Linux system. Although enough, you can find another techniques around the Internet. This technique is simple and worked for me.
Here goes an overview:
Boot the system in single user runlevel (1)
Uses the shell to reset the password
The first step is to forget the root password. You should not do it on purpose, of course.
Second, you will need physical access to the system, as there are no network in runlevel 1 for default. This will not work for remote servers, like those in Amazon AWS.
Third, reboot the system and on the boot loader (probably Grub), select the kernel which you want to boot and press "a". This will allow you to append arguments to the kernel initialization. Add the "single" argument to boot in runlevel 1 (single user). The kernel command will look like this:
ro root=LABEL=/ single
Press enter and watch the system boot.
Fourth, use the passwd program to reset the root password:
passwd root
Finally, reboot the system again. You will be able to login with the new root password.
:)












