How to Reset Root Password in Linux

If you forgot your Linux root password, you can use this technique:

1. Boot the system and when you see the following message “Press any key to enter the menu”,press any key. (You will see the list of available kernel versions.)

2. Press e in order to edit commands before booting.

3. Highlight the list item with vmlinuz in it by using the arrow keys and press e.

4. Now type single or init 1 at the end of the line (you must enter SPACE first).

5. Then press enter and b to boot the system with the new argument. (The system will boot into single user mode and you will see bash prompt)

Now it’s time to change the password:

6. Type passwd

### Shell Commands ###
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Type reboot to restart the system.

Source: Java


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s