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.15roroot/dev/hda2), Type e to enter the edit mode; 3. add init/bin/bash at the end of the sentence, and press enter...
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:
//-W equals to-o rw.-o rw is mounted in read/write mode. -O sync is executed in synchronization mode. -O remount re-hangs an existing file system in different ways. For example, a previously read-only system can be re-mounted in the read-write mode.
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.
Author: "xiaoliangyu"