How to reset CentOS 7 root password

Restart the computer system when the reading of the Esc key is pressed, then the following interface will pop up, as we used here is a mirror image guide, it is the third choice.
How to reset CentOS 7 root password

Password Forgot aspects of course belong to incurable diseases, so here we choose the last one.
How to reset CentOS 7 root password

Since there is a problem of course need to be diagnosed, so here we choose the second, on CentOS diagnosis.
How to reset CentOS 7 root password

Select 1, loaded into the mirror mode.
How to reset CentOS 7 root password

In this interface shell to directly enter into the terminal mode.
How to reset CentOS 7 root password

Entering commands at the shell terminal mode chroot / mnt / sysimage / loading into the system image and bash environment.
How to reset CentOS 7 root password

Bash into the environment after the change password and consistent operation of the terminal environment. Enter the command passwd root password change.
How to reset CentOS 7 root password

Password changes are complete we can to verify whether the modified password can log in normally, first we exit bash mode and reboot the system.
How to reset CentOS 7 root password

Facts have proved that our password change is successful, we have been able to enter a new password for the normal login system.
How to reset CentOS 7 root password
How to reset CentOS 7 root password

Guess you like

Origin www.linuxidc.com/Linux/2019-08/160366.htm