2009
03.09


Depending on your GRUB setting, you might see this screen first when you boot your Linux, Press your Esc key here to go to kernel selection window.

Select the working kernel that you normally use, and press the key "e" to edit the GRUB entry for that kernel.

 You’ll come to this screen which displays the settings for the particular kernel.

 Select the kernel configuration line, and press the key ‘e‘ again.

Here you need to add init=/bin/bash at the end of the line. This is to tell your Linux system to run Bash directly, rather than executing other init scripts that normally runs during normal bootup.

 Press the "Enter" key and you’ll be brought back to this screen. Press the key "b" to boot that particular kernel.

 Your Linux system will boot straight to Bash, bypassing almost everything including the login prompt, giving you superuser access. Here you’ll probably need to remount the root filesystem in a read and write mode with the command mount -o remount,rw / as the following;

You’ll then come to the part that you’ll set the new password for your root account. At the prompt, type the command passwd, and enter your new password when requested.

And that’s just it. Reboot your Linux machine to test if it really works. You can also change password for other users here by typing the command passwd followed by the desired username, and enter the new password when requested.

 


No Comment.

Add Your Comment