CentOS forgot the root password. Solution: centos forgot the root password.
1. After starting the instance, press any key before the last 5 seconds.
2. on the page that displays centos..., press edit)
3. The interface of the three lines will appear. Select the line in the middle of the kernel... and press the e key.
4. At the end of the interface that appears, there is a quiet, followed by space and 1, and then press Enter.
5. Go back to the interface of the previous three lines, continue to select the line of kernel, press the key B, the system will automatically restart and enter the root Interface
6. Enter passwd root and press Enter.
7. Enter the new password and press Enter. If passwd: all authentication tokens updated successfully. is displayed, the modification is successful.
8. restart the system shutdown-r now
9. After the restart is successful, the login name is root. Press enter and enter the password. Press enter. Then you can successfully access the CentOS system.