In Linux operating systems, the root user plays a fundamental role in all the administrative, support and functional tasks of both the users and the applications and processes carried out there. By default in Debian, the root user is not enabled to avoid bad manipulations or errors while working on the system, but as nowadays everything is linked to the use of passwords, we usually forget the root password since we use "sudo" to execute orders with this type of permission..
The use of the password in our Operating Systems is important to protect our information since it is the retaining wall against possible unwanted access. By changing Debian 11 password we make sure that if someone knows our password, we have replaced it with another one. It may also be that we have forgotten the password and have to reset the Debian 11 password .
If we have forgotten the root password in Debian , TechnoWikis will explain the process to recover it and we will do this in Debian 11 “Bullseye”..
We leave you also below
To stay up to date, remember to subscribe to our YouTube channel! SUBSCRIBE
Change root password Debian 11
Step 1
To start the process, we must restart or turn on the computer and Debian 11 will launch the following window:
Step 2
There we have the current system and its advanced options, in this case we must access the GRUB editor and for this we press the "e" key and we will see the following:
Step 3
There we are going to locate the line that starts with the text "Linux" next to the text / boot / vmlinuz- * with the UUID of Debian 11, there we must use the scroll arrows and go to the end of this line and replace the text "ro quiet ”by the text“ init = / bin / bash ”:
Step 4
init = / bin / bash allows you to perform the editing tasks in the Debian 11 startup bash. After that we will use the Ctrl + X keys to access the simple user mode and to change the root password effectively modify the access read-only read-write with the following command:
mount -n -o remount, rw /
Step 5
After that we are going to execute the following command to establish the new root password (we must enter it and confirm it):
Step 6
Once we make the change, we combine the following keys to restart Debian 11 and in the console it will now be possible to access with the root user:
Ctrl + Alt + Del
We can see that thanks to this method we can set the new root user password without the need to enter the current password but always taking into account the capabilities and permissions of this user.