Linux root password forgotten

problem:

As a long time without their own installation of a virtual machine operated, resulting in even the root user's password forgot, there was not a who.

I am using centos6.5, on the record today about how to reset the root password.

Steps:

step one:

When the start-up boot icon appears, then quickly press Esc or E , we must hurry up, otherwise always too late, you can start up after the point. . .

When pressing the Esc or E will be the following interface:

 

 Step two:

Then in this press e , e is the figure above are explained what to do, 'e' to edit the commands before booting, meaning that before you start editing commands. E appears after pressing the FIG interface:

 

 FIG already described, using the up and down arrows to select, then we select the kernel kernel this line, i.e., to be operated after the selected row, continue to E, the following interface:

In the last message, press the space bar on the keyboard and then enter the number 1, or may be a single direct input.

When finished click the Enter key keyboard, the following interface:

 

 

Step three:

This is a press b to start, then the following interface will appear:

 

 This is a direct input passwd root, reset the root password, which is to enter a new password, then enter the password for confirmation, remember Linux password is not displayed, so be sure to enter the correct and consistent two passwords.

Here root user to reset the password has been completed, it will be like the following:

Then enter the command reboot restart to OK!

But this kind of thing is to remember passwords good, or forget too much trouble.

Guess you like

Origin www.cnblogs.com/wlv1314/p/12312886.html