How to Reset a Forgotten Root Password in Linux Mint

It’s not unusual for users to forget their root passwords. It’s a common occurrence especially if you haven’t logged in as the root user for a long period of time. It can happen to the best of us. But don’t worry. In this guide, we will walk you through how you can reset a forgotten root password in Linux Mint.

Read Also: How to Reset Forgotten Root Password in Debian 10

To get started, power on or reboot your Linux Mint system. After a few seconds, you should get a grub menu on the screen as shown below.

Linux Mint Grub Menu
Linux Mint Grub Menu

On the first highlighted option, press 'e' on the keyboard to edit the grub parameters. You should get the screen shown below.

Linux Mint Grub Parameters
Linux Mint Grub Parameters

Next, scroll down using the arrow down cursor key until you get to the line beginning with 'linux'. Navigate until you get to the ro quiet splash section and add rw init=/bin/bash.

Change Linux Mint Grub Parameter
Change Linux Mint Grub Parameter

Then press ctrl + x or hit F10 to boot into a single-user mode as shown below.

Linux Mint Single-User Mode
Linux Mint Single-User Mode

To reset the forgotten root password in Linux Mint, simply run the passwd root command as shown.

# passwd root

Specify the new root password and confirm it. If the password matches, you should get a ‘password updated successfully‘ notification.

Reset Root Password in Linux Mint
Reset Root Password in Linux Mint

And finally, press Ctrl + Alt + Del to exit and reboot Linux Mint. You can now log in as the root user using the newly created password. And that’s how you can reset a forgotten root password om Linux Mint.

James Kiarie
This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I'm not running commands on the terminal, I'm taking listening to some cool music. taking a casual stroll or watching a nice movie.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

34 thoughts on “How to Reset a Forgotten Root Password in Linux Mint”

  1. No joy here. I had this desktop computer packed away for a few months, long enough to forget the whole password.

    I followed the original steps to Ctrl-x, but the new password doesn’t work.

    I followed the steps, and using “sudo passed root“, Ctrl-x, doesn’t work.

    I added a line of “passwd {username}“, Ctrl-x, no good.

    I like Mint (20.1 I believe) but I know almost nothing about the Linux command line.

    Reply
  2. My PC doesn’t recognize my root password when I try to run anything requiring it (e.g. the Update Manager). I have my PC set up to log on automatically without a password on power-up, and that works OK. ‘Sudo Su‘ in a script also rejects my password.

    Since the last time I used root mode, I’ve had an Nvidia card fail, and replaced it with a different Nvidia card, prior to which I did a kernel update and a Timeshift. Looking at various forums any of these could be responsible.

    Should the fix described above work OK on Linux Mint 20.3 with Cinnamon 5.2.7 and Kernel 5.4.0-135-generic?

    Reply
    • @Bob,

      We have tested it under Linux Mint 19.2, but I think the instructions provided in this article should work on Linux Mint 20.3 with the Cinnamon edition.

      Reply
    • After sudo su type your user’s password to enter super user then try the procedure on it.

      Works on my Linux mint 19.3 cinnamon :)

      Reply
    • sudo passwd root works in some cases in the single-line command given.

      If the system’s superuser and other system users are the same people, passwords for superuser and regular username with restricted permissions are different in both users.

      I was resetting the root password on my Linux Mint 20.1 Ulyssa 64-bit version earlier last month with a single-line comment

      $ sudo passwd root 
      

      I think it worked very well.

      Before I used Ubuntu variant Lubuntu 14 on my second Linux laptop brand new in the year 2005 and there was the solution by mounting your hard drive with reading and writing permissions before changing the password command in Recovery mode but like in this James Kiarie great blog post article, you have to reboot your system holding SHIFT-key.

      It’s not necessary anymore for Mint users’ to reboot the whole system I think nowadays.

      This option and possibility to reset admin’s and superusers passwords in Ubuntu and Mint make it there’s no way to use Mint or Ubuntu system in industrial use due to security issues what makes sense when Linux/Unix System Administration comes to industrial zone (For ie. Small company’s server for it needs excluding traffic outside of office’s IT Infra).

      Reply
  3. Does not quite work in Linux Mint 20 in single-user mode,

    The solution, after doing: passwd root
    do passwd your username

    with your username (no caps) I suggest you set both the same password.

    Reply
  4. I have an added problem it says I was successful at changing my password but it still doesn’t work to log in. Is there a way to eliminate the password? I have not been able to get into my computer for a while now.

    Reply
  5. Running Linux Mint 20 updated on 1/1/2021 in single-user mode requiring entry of user password. Followed your instructions exactly and everything went as described. Entered and confirmed a new password and got “Password Successfully Changed”.

    Used F10 key to continued booting. Got Enter the Password login screen and entered the new password. It said “the wrong password” I tried the new password several times and still got “the wrong password” — So I entered the OLD password and log-in proceeded as normal. Did several reboots including one from the power-down state — no luck. The new password is not recognized by the OLD password is.

    So, as of January 1, 2021, the Grub modification of the root password does not seem to work. There is only one user on the system, so unless I don’t understand something the root password should be the Username password, right?

    Reply
  6. I have tried everything possible to change the login password on my laptop, with no results. I’m using Linux mint 19.3 cinnamon. Any suggestions out there!!

    Reply
  7. Well, I got as far as typing in the new password but for some strange reason all of the keys stopped working, yet they did to type previous settings. Any ideas?

    Reply
  8. Hi

    If you are having issues getting this to work, try changing the password for the ACTUAL USER ACCOUNT, not for the ROOT user. The instructions worked for me up to the log in screen (GUI) but root users are not allowed to log in this way.

    So, repeat all of the above steps, but when you get to this step:

    “To reset the forgotten root password in Linux Mint, simply run the passwd root command as shown”

    INSTEAD of ‘passwd root’ type in ‘passwd user’ – I don’t mean literally type ‘user’ – type in the user name of the locked account. You will know this from the login screen. EG ‘passwd jenny’

    Set and confirm the password as prompted.

    Worked for me!

    Reply
  9. This had saved me!

    After useredit I thought I added myself to the group FTP. After logon iI found out I removed my user permissions.

    I thought I had to start all over again. Thanks!

    Is it the same to remove the "rw init=/bin/bash" line from the grub after success?

    Regards, Rob, K

    Reply
  10. This method simply does not work. I got as far as changing the code to the bin/bash bit, but then received pages of stuff that did not end with the “root done” phrase and then demanded various things that I have never heard of. So I am stuck with not knowing the password and not being able to change it.

    Reply
  11. The above instructions are just wrong. Replace the part where it says to past in “rw init=/bin/bash” with the following instructions that I found on another site:

    Goto the end of the current line, remove “ro quiet splash $vt handoff” and append “rw init=/bin/bash

    the article’s instructions instruct you to insert the text leaving the old text. this is wrong. you need to replace and append not just insert the new text.

    this worked for me

    Reply
  12. I have forgotten my password and I have all those tutorial but they are in vain the os is Linux Mint 19.2 and the asset is Lenovo G50.

    Please help me.

    Reply
  13. I’m a total greenie who can ONLY follow instructions and they did NOT work for me. The systems say the change is successful but I don’t know where to go from the prompt is dumps me at. “login” goes nowhere. So I do a hard reboot and then my new PW is NOT accepted.

    After running thru the “seemingly simple” steps a 2nd time and getting the same result, I’ve no idea what to do. How can I thank anyone?

    Reply
  14. Has anyone tried this? Maybe you should add a new user or change the password for an existing user? Who knows?

    Reply
  15. Very clear directions, as ever, but I always that Ubuntu-based systems like Mint did not make use of the root user, relying instead on sudo for an administrative user. This is the password that matters if you forget or lose it. Presumably, if you follow the directions here you’d have to log into the root account and update the admin user password from there if in fact, it’s the admin user password you’ve lost?

    Reply
    • You’re RIGHT! I’m LOST. I don’t understand.

      The password I lost is the one that LM19 periodically demands on boot up.
      (Is the poor thing afraid I don’t pay enough attention to it?)

      I just did it again, but WHAT did I just do again? If the “root password” doesn’t matter like the sudo pw, why is there a root PW at all?

      And if I’ve now got to fix what I’ve done, how do I log into the “root account”?

      AND

      What magic incantation do I use to “update the admin password” once I am there?

      Please. I’m a lonely Linux user here behind the Great Firewall. (The Chinese end-users I must hang with have never heard of Linux!)

      Theo.

      Reply

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.