This article mainly introduces how to forget the root password for Linux. For more information, see
How does one forget the root password in Linux? This situation is not very common, but some careless administrators do not log on to the system for a long time, and they will forget the password. At this time, if it is remote management, it would be the same. If the linux host is on your side, it will be saved. Follow these steps:
Solution
1. after the system is restarted, the GRUB interface appears on the boot loader menu. use the up and down arrow keys to select the system you forgot the password and type "e" to enter the editing mode.
2. Next, you can see the image shown in. then, you can use the up and down keys to select the latest kernel (the second line is the kernel .......), then press "e.
3. add a space after the rhgb quiet on the editing page, type "single", or enter "1" of the number and press enter to confirm.
4. press enter and press the "B" key to start the single-user mode. here, modify the root password.
5. after the restart, the root password is changed!