Now we generally use GRUB as the system bootProgramLilo's way to access a single user is very simple. I won't mention it here.
For some versions of OS (such as RedHat), edit grub and add "single" to enter the single-user mode. However, this method is invalid for Debian, because Debian requires you to enter the root user password when entering the single-user mode.
The following describesAll VersionsMethods available on Linux GRUB:
1. On the grub boot loader menu, select the entry you want to enter and 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 to enter edit mode;
3. Add "init =/bin/bash" at the end of the sentence and press Enter;
4. Press "B" to start the system.
In this way, we can get a bash shell.
After entering the shell, the Mount mode of the root partition is read-only by default. We need to change it to writable; otherwise, the root password cannot be changed:
Mount-No remount, RW/
Passwd Root
Sync
Mount-No remount, RO/
Reboot
In this way, the password of the root user of Debian can be changed successfully.