After the root user password is restored in single-user mode and the host is restarted, press the up/down key to cancel the countdown when the Grub menu appears to enter the kernel boot interface and press the e key as follows: move the cursor to the Kernel line and press the e key to enter & rdquo; single & rdquo; at the end of the line. you can also enter the letter & rdquo; s & rdquo; or the number & rdquo; 1 & rdquo; both indicate entering the single-user mode, and then press Enter to restore the root user password in single-user mode.
After the host is restarted, press the up/down key to cancel the countdown when the Grub menu appears.
Enter the kernel boot interface and press the e key as follows:
Move the cursor to the Kernel line and press the e key.
Enter "single" or the letter "s" or "1" at the end of the row to enter the single-user mode and press enter.
Press the B key to direct the system to single-user mode, and directly enter the shell environment without a password.
Run the "passwd root" command under a single user to reset the root user password!
Login successful!