Password forgotten how to do, to take you to reset the password with CentOS 7root

We live in a variety of privacy are protected with a password, but the password is too much will always be some accidents, such as the more common password is forgotten. When we forget the root password, you can not log in to perform Linux system management, maintenance and other tasks, but only to use some limited functions by other users, will inevitably have some impact our normal use. Today, we have to do is take you to learn how to reset your password in password forget.
1, the first step in restarting the host
Password forgotten how to do, to take you to reset the password with CentOS 7root

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.
Password forgotten how to do, to take you to reset the password with CentOS 7root

Password Forgot aspects of course belong to incurable diseases, so here we choose the last one.
Password forgotten how to do, to take you to reset the password with CentOS 7root

Since there is a problem of course need to be diagnosed, so here we choose the second, on CentOS diagnosis.
Password forgotten how to do, to take you to reset the password with CentOS 7root

Select 1, loaded into the mirror mode.
Password forgotten how to do, to take you to reset the password with CentOS 7root

In this interface shell to directly enter into the terminal mode.
Password forgotten how to do, to take you to reset the password with CentOS 7root

Entering commands at the shell terminal mode chroot / mnt / sysimage / loading into the system image and bash environment.
Password forgotten how to do, to take you to reset the password with CentOS 7root

Bash into the environment after the change password and consistent operation of the terminal environment. Enter the command passwd root password change.
Password forgotten how to do, to take you to reset the password with CentOS 7root

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.
Password forgotten how to do, to take you to reset the password with CentOS 7root

Facts have proved that our password change is successful, we have been able to enter a new password for the normal login system.
Password forgotten how to do, to take you to reset the password with CentOS 7root
Password forgotten how to do, to take you to reset the password with CentOS 7root

Guess you like

Origin blog.51cto.com/14449528/2432219