Users need a password to log in and use all the distributions of Linux. Users cannot access their data without logging in to the system. Fortunately, it is possible to reset/recover the forgotten/lost password even when users cannot log in to their user accounts. However, users must ensure that their “/home” directory is not encrypted because there is no way to reset the password.

This guide discusses how to reset the forgotten/lost user password on Linux Mint.

Quick Outline

How to Reset the Forgotten/Lost User Password on Linux Mint?

To reset the forgotten/lost user password on Linux Mint, users must reboot their system and press & hold the “Shift” key after the boot screen. Doing this triggers the following screen, select the option “Advanced options for…Cinnamon”:

Now, press the “e” key to edit the commands before booting the system:

It opens the following window, find the line starting with the “linux and ending with the word “splash”:

After finding the specified line, append “rw init=/bin/bash”. Doing this tells the system kernel to mount the file system (root) along with read & write privileges. It is often used to fix the misconfigured files or reset the lost user passwords:

After appending, press the “Ctrl + x” or the “F10” keys to reboot the system.

From the next screen, run the following commands to view the usernames associated with the home directory and change the user’s password:

ls /home

passwd

Here, 

  • The  “ls /home” command displays the usernames associated with the home directory. 
  • The “passwd” command changes the password. It prompts the users to enter “New password” and then “Retype new password”. After matching the strings, it displays the message “passwd: password updated successfully.

Users can also specify the username along with the “passwd” command. For instance, if a user wants to change the root user’s password, the command will be:

passwd root

By following the above syntax, users can reset the password for other users as well.

How to Reset Password on Linux Mint Using the Recovery Mode

To reset the forgotten password using the recovery mode in Linux Mint, select the option “Advanced options for…Cinnamon”, as seen below::

Following that, select the “Linux Mint 21.3 Cinnamon… (recovery mode)” option:

It opens the “Recovery Menu”, select the “root Drop to root shell prompt” option from here:

It triggers the following command line screen below the Recovery Menu. From here, users can execute the commands as the “root”. To reset a password for a specified user (mintuser in this case), run the following command and enter “New password”:

passwd mintuser

Now enter the “exit” command to return to the “Recovery Menu” and use the “resume” option to make the system boot normally:

After the system boots (normally), use the new password to login.

How to Change Other User’s Password Using the “root” User Account?

If you have created a new user account, but forgot the password, you can use the “root” user to reset the password. In Linux Mint, the root user account’s password is exactly the same as the first user’s. To change the password for the new user, open the Terminal, and run the below commands:

su root
passwd mintuser
exit

Here, 

  • The “su root” switches the current user account with the root account.
  • The “passwd” followed by the username triggers the command to modify the password for the specified user account.

Bonus Tip: How to Fix Linux Mint Not Showing GRUB Menu?

Multiple users reported that their system boots directly into the Linux Mint without showing the BIOS or GRUB menu. Even pressing and holding the “shift” button does not work. To resolve this issue, open the Terminal, run the below command and open the “grub” file:

sudo nano /etc/default/grub

In the “grub” file, replace “GRUB_TIMEOUT_STYLE=hidden” with “GRUB_TIMEOUT_STYLE=menu”. This makes sure that the “GRUB” menu appears. Also, specify the time (in seconds) after which the GRUB menu disappears; let’s set it to “5” seconds employing the “GRUB_TIMEOUT=5”. This sets the timer to 5 seconds and the GRUB menu waits 5 seconds before selecting the default option. Pressing any key discards the timer:

After making the GRUB configuration changes, press the “CTRL + S” to save and “CTRL + X” to close the file. Following that, advance using below stated command to make the changes take effect by updating the “GRUB” configuration file on Linux Mint:

sudo update-grub

The above command updates the “GRUB” configuration file.

Final Words

To reset the forgotten/lost password on Linux Mint, users must select the “Advanced options for…Cinnamon” and press the “e” to edit the commands. Next, append “rw init=/bin/bash” to the line starting with the “linux and ending with the word “splash”. After rebooting, use the “passwd” command to change the password for the desired user, as illustrated above. This guide has discussed all methods to reset the forgotten/lost password on Linux Mint.