Reset your Forgotten root password for Debian Panel

Steps on how to reset your Debian root password

  1. Reboot your system: If your Debian system is running, restart it.
  2. Access the GRUB menu: As your system boots up, you should see the GRUB boot menu. If you don't, press and hold the Shift key while your system restarts.
  3. Edit boot parameters: Highlight the first boot option (usually the default one) and press e to edit its parameters.
  4. Modify the Linux line: Find the line starting with linux and navigate to the end of it. Add a space and then type init=/bin/bash.
  5. Boot into single-user mode: Press Ctrl+x to boot the system with these modified parameters. This will start your system in a limited recovery mode.
  6. Remount the root filesystem: In the recovery environment, type the following command and press Enter:

mount -o remount,rw /

This command changes the root filesystem to read-write mode, allowing you to modify the password file.
  1. Change the root password: Now you can reset the root password using the passwd command:

passwd

 
You'll be prompted to enter and confirm the new password.
  1. Reboot the system: After setting the new password, type reboot and press Enter to restart your system.
You should now be able to log in with your new root password.