RSS Feed for This PostCurrent Article

Recover root password for Linux systems

Sometimes you forget the root password on your Linux system – it happens.

On Linux, recovering the root password can be done by booting your Linux system in single user mode, aka runlevel 1.

This tutorial will show how to boot Linux in single user mode when using GRUB and finally how to change the root password.During normal usage, a Linux OS runs in runlevels between 3 and 5 which correspond to various multi-user modes.

When booting Linux at runlevel 1, single user mode, a root prompt, or sys prompt will be displayed. Working at that prompt, it is an easy task to change the root password.

The following sequence of steps is required to reach the root prompt:

1. Start your PC at the boot loader press the space bar before 5 seconds

2. Press “p” and enter the boot loader password

3. Press “a” to modify the kernel arguments before booting

4. At the end of the line add the word single or 1

      grub append> ro root=/dev/lvm/logvol01 rhgb quiet 1

5. It will be logged on as root user

6. Change the root password by running the command:   passwd
    (As root, changing password does not ask for your old password)

Trackback URL

Sorry, comments for this entry are closed at this time.