How to Reset root password in Debian10

How to Reset root password in Debian10
1. Power on or reboot Debian10 server , Grub menu will show up , press ' e " in keyboard before it boot into OS .
2. Scroll down and locate the line that begins with ‘linux’ that precedes the /boot/vmlinuz-* section,  Move the cursor to the end of this line, just after ‘ro quiet’ and append the parameter init=/bin/bash
3. Next hit ctrl + x to enable it to boot in single-user mode with the root filesystem mounted with read-only (ro) access rights.
4. To  reset the password, you need to change the access right from read-only to read-write. Therefore, run the command below " mount -n -o remount,rw / " to remount the root filesystem with rw attributes.
5. Reset root password with command " passwd ", input New password twice .
6. Reboot server

Add Feedback