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
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 Forgot aspects of course belong to incurable diseases, so here we choose the last one.
Since there is a problem of course need to be diagnosed, so here we choose the second, on CentOS diagnosis.
Select 1, loaded into the mirror mode.
In this interface shell to directly enter into the terminal mode.
Entering commands at the shell terminal mode chroot / mnt / sysimage / loading into the system image and bash environment.
Bash into the environment after the change password and consistent operation of the terminal environment. Enter the command passwd root password change.
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.
Facts have proved that our password change is successful, we have been able to enter a new password for the normal login system.