1, on the Grub Boot loader menu, select the entry you want to enter, type "E" to enter the editing mode;
2, in the second line (similar to kernel/vmlinuz-2.6.15 ro root=/dev/hda2), type "E" into the editing mode;
3, at the end of the sentence plus "Init=/bin/bash", enter;
4, press "B" to start the system.
So we can get a bash shell, after entering the shell, the mount mode of the root partition is read-only by default, we have to change it to writable, otherwise the root password cannot be changed:
This will successfully change the password of the Debian root user.