How to reset root password from boot on Debian 11.3

To Reset Root Password From Boot On Debian 11.3

Introduction:

Grub is the boot menu that allows you to choose between multiple operating systems if you have more than one installed. Additionally, Grub can be used for troubleshooting and modifying boot arguments or to boot from an older kernel.

procedure:

Step 1: Open Debian 11 Grub menu.To reset the password, first, we have to access the Grub menu of our Debian 11 Bullseye. Restart our system and while doing that press and hold the Shift key on your Keyboard. This will drop you into the Grub menu of Debian 11.

Step 2: The next step is to edit the default boot entry of your Debian 11. For that press the ‘e’ key

Step 3: On the Grub editing screen, use your arrow key and move to the end of the line starting with “Linux”. There at end of this line type – rw init-/bin/bash

Step 4: After editing the syntax, next, boot system. For that either use CTRL +x or F10.

Snap 5: Now, without providing any password you will have Debian 11’s shell root access. Here, let’s check whether our user has read and write access to the file system where the OS has been installed.

Snap 6: Reset root user password

Snap 7: To change the password of some other user than root, we have to mention the username of the same.

Snap 8: once you are done next reboot the system by using following commands and press Enter key.

Step 09: From here, you can log in and access your system with the newly set root password.

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to reset root password from boot on Debian 11.3. Your feedback is much welcome.

FAQ
Q
Which command reset the root password?
A
The passwd command at the command line prompt to reset the root password.
Q
How do I change my root password at startup?
A
In the GRUB menu, find the kernel line starting with linux /boot/ and add init=/bin/bash at the end of the line.
Q
How do I find my root password in Debian?
A
If you forgot your root password, you first need to reset the password, then log as root (now accessible without password) and run passwd to set a new password
Q
Why Linux has no virus?
A
Some people believe that Linux still has a minimal usage share, and Malware is aimed at mass destruction. No programmer will give his valuable time, to code day and night for such a group, and hence Linux is known to have little or no viruses.
Q
What is Debian mainly used for?
A
Debian is a Linux-based operating system for a wide range of devices including laptops, desktops, and servers. We provide a reasonable default configuration for every package as well as regular security updates during the packages' lifetimes. Debian has extensive Hardware Support.