Solution to CentOS password loss
Restart the system, and then press any key in the next five seconds. For example
Enter the following screen and press the [e] key, as shown in figure <Strong? Http: www.bkjia.com kf ware vc "target =" _ blank "class =" keylink "> VcD4KPHA + pgltzybzcm9 "http://www.2cto.com/uploadfile/Collfiles/20140409/2014040911061022.jpg" alt = "\">
Move the cursor to the second line and press the [e] key, for example:
Now you can add a single entry at the end of the text to tell GRUB to guide the Linux mode of a single user. For example:
Press the [Enter] key to make the editing result take effect. The page goes to the third part of the screen. Press the [B] key and wait for a few seconds. After loading, you will face a shell prompt similar to the following. Then we enter passwd root to create a new root password. As shown in
Enter reboot to restart and enter a new password to log on.