How to Reset forgotten Debian Linux password [Top Way]

Reset forgotten Debian Linux password

[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.

Recommended Article: Tutorial resize root partition on Linux Ubuntu and Debian

How to Reset forgotten Debian password

When the GRUB menu is presented, proceed and press the ”e” key before the system starts booting.

GNU Grub Menu


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.

Kernel parameters


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.

Recommended Article: Tutorial Install Froxlor on Linux Debian 10

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.

:/# passwd

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.

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 4

No votes so far! Be the first to rate this post.

We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.
  • Kracken D Whip
    Kracken D Whip
    3 years ago

    Pressing “e” key before boot did not work.

    • Michael Morgan
      Michael Morgan
      3 years ago

      You can use the passwd command method instead. Note that if you are not the system administrator, you must ask the administrator to execute the passwd command to reset the password. If you are a system administrator, you can run the following command:

      sudo passwd

      It should be noted that if you remember the root password, you can log in as root and change the user password there:

      su -



Leave Your Comment

Your email address will not be published.

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way


7 days a week, 24 hours a day