[Updated on: 2020/12/24] In the large world of digits and information, it is very normal to happen to forget a password. We are recommended to set strong passwords, not write them down anywhere, not use our personal information, and just try to memorize it. Oops! It seems to be confusing and you may have faced the moment you have no idea about what you have chosen for your password yesterday! Do not worry, in this article, you will learn How To Reset forgotten Debian Linux password. Prepare your Linux VPS safely and save this guide as a solution for any time you forgot the password.
Tutorial Reset Forgotten Root Password In Debian 10
In a normal situation, both regular and superusers are able to access services via password authentications. But once a regular user forgets his/her password, a superuser could help them to reset their password from the terminal. And the second issue is when the superuser (or root user) himself/herself loses the password. In the following, you will learn what should be done when you can not log into your Debian system. Let’s go through the steps of this guide to learn and finish it.
How to Reset forgotten Debian password
When the GRUB menu is presented, proceed and press the ”e” key before the system starts booting.
Then, you will see the screen below. As you see in the below screen, scroll down to find the line beginning with ”linux” which also specifies UUID.
At this point, put the cursor to the end of the mentioned line. Append the parameter:
Now, you must press CTL + x to enable it to boot in single-user mode with the root filesystem mounted with read-only (ro) access rights.
In this step, you are ready to start the main process of resetting the password.
Since you need to change the access right from read-only to read-write, you should use the following command to remount the root filesystem with rw attributes.
:/# mount -n -o remount,rw /
And finally, you can run the good old Passwd command to reset the root password.
Again, the moment of providing a new password. choose your preferred and retype it to confirm. As you know, both passwords you write should be matching. If you set all well, you see the notification of ”password updated successfully” at the end of the console.
For the last step, press Ctrl+Alt+Del to exit and reboot. At this time you can log in as the root user again when you enter your new password you have just set.
That’s that! it was all you need to proceed when you do not remember your password.
In this article, you learned How To Reset forgotten Debian Linux password. It is very easy to do that, so it may notify you that anyone who has access to your computer can easily use this method and reset your superuser or root password. The solution is to encrypt the whole hard disk. In case you are interested to read more, find our related article on How to Linux login without entering password.