1. restart the machine. after the grub boot interface appears, press F2 and add init/bin/bash to the linux startup options, by passing the init/bin/bash parameter to the kernel, the OS runs bash before running the login program, and the command line appears. 2. wait for a moment (none) #: command line. 3. input mount-n/-o
1. restart the machine. after the grub boot interface appears, press F2 and add init =/bin/bash to the linux startup options, by passing the init =/bin/bash parameter to the kernel, the OS runs bash before running the login program, and the command line appears.
2. wait for a moment (none) #: command line.
3. input mount-n/-o remount, rw
4. input mount? N/usr
5. enter cd/usr/bin.
6. enter the passwd command to reset the password. Enter the new password.
7. after modification, remember to use mount-n/-o remount. ro sets the root file system to the original state.
8. enter exit to exit the system, restart the system, and log on with the new password.