CentOS 7 in forgotten how to reset the root password experiment

We do today is the third experiment: CentOS 7 to reset the password for the root user

Test environment preparation: VMware virtual machine is installed CentOS 7

We found the login screen forget the root user's password, which gives time we have to use the rescue mode system,
click on the shutdown icon in the upper right corner of the login screen, drop-down select Shut Down, click Restart
CentOS 7 in forgotten how to reset the root password experiment

The first step: load the image into the system:

When reading of rapid restart press Esc to enter a subsequent interface, subsequent operation as shown below:
CentOS 7 in forgotten how to reset the root password experiment
CentOS 7 in forgotten how to reset the root password experiment
CentOS 7 in forgotten how to reset the root password experiment
CentOS 7 in forgotten how to reset the root password experiment
CentOS 7 in forgotten how to reset the root password experiment

Step two: Change Password:

After entering the command interface
input: chroot /mut/sysimageto enter the bash environment
Input: passwd root
Input: new password, for example abc123456, once again confirmed password
Input: exitExit
Input: rebootrestart
steps below:
CentOS 7 in forgotten how to reset the root password experiment
Verify After the restart, login into the system after the new password, described root password weight home success.
CentOS 7 in forgotten how to reset the root password experiment
CentOS 7 in forgotten how to reset the root password experiment

These are experiments to reset the root password in CentOS 7, when then forget the password reset very practical.

Guess you like

Origin blog.51cto.com/14464303/2432054