How to reset root password in Debian 11 Bullseye – Linux Shout

Reset your forgotten root password for Debian 11 Bullseye server or desktop by resetting it. Here are the commands to follow for that. 
Forgotten passwords are always annoying – especially when it comes to your computer password. So you can no longer access your important data.
Among the numerous tasks that we have to carry out every day when managing Linux operating systems is resetting the password of the users, whether they are logged in or not, to regain access to the system and make it work properly. However, being an administrator you need root user access for that. But what happens if you forget the root password. In such conditions, you won’t be able to perform the core tasks of your computer. This problem often occurs because users use multiple passwords on multiple platforms. So, here is the solution for that.
To reset the password, first, we have to access the Grub menu of our Debian 11 Bullseye. Restart your 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.
The next step is to edit the default boot entry of your Debian 11. For that press the ‘e’ key on your keyboard. This will let you edit the Grub’s boot prompt. Don’t touch or delete anything here. Once you have the editor move to the next step.
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, as shown in the given screenshot.
After adding the given syntax, next, boot your system with this configuration. For that either use Ctrl+X or F10.
Edit Debian 11 Bullseye Grub menu
Now, without providing any password you will have Debian 11’s shell with root access. Here, first, let’s check whether our user has read and write access to the file system where the OS has been installed.
For that use a command:
If the output is:
(rw,realtime) then it means you have real-time-  read and write access to the file system.
Now, let’s change the password as we do normally on a Linux system using the command terminal.
The system will prompt to add a new password two times:
Reset Root password in Debian 11 Buslleye
To change the password of some other user than root, we have to mention the username of the same. For example, if our system user name is Debian and we want to change the password of that then the command will be:
Change Debian 11 user password
Once you are done resetting your Linux password then restart your system to log in with the changed password. For rebooting, type:
And that hit the Enter key.
From here onwards, you can log in and access your system with the newly set root password. This guide would be useful for those who somehow lose or forgot the root password and now want to change the same. The steps given in this article will also work for other Debian 11 versions as well.
Other Articles:
Install PowerShell on Debian 11 Bullseye Linux
Install phpBB forum on Debian 11 Bullseye
How to install Telegram on Debian 11 Bullseye
Forgot Your Linux Mint password- Here is a way to recover it.




This site uses Akismet to reduce spam. Learn how your comment data is processed.
Linux Shout crafted as a part of our main portal H2S Media to publish Linux related tutorials and open source Software.


We will be happy to hear your thoughts

Leave a reply

Compare items
  • Total (0)