Home Linux Mint How to reset your root password on Linux Mint

How to reset your root password on Linux Mint

by Abraham
reset password linux mint

A password is used to authenticate any system, whether a desktop or mobile device. Setting a strong password that is difficult to guess is required when using the system. Changing your password periodically will help you protect your system from assaults. It occurs while you are working as a teammate in the workplace. In that case, some of your team members might be aware of your password. This might cause issues since anyone could hack into data or attack it.

You can overcome these challenges by periodically changing your passwords. Even if someone finds your old password or credential, they won’t be able to access the system. Let’s assume that, for some reason, you forgot the Linux computer’s password. Whatever the reason, the result is that you forgot the most crucial component for using your computer. What’s next? You are prevented from accessing vital office documents, assignments, or anything important. You might think that you should modify your system’s password as well. It can sometimes be crucial if you believe someone tried to access your computer unlawfully. You should immediately change your password to something more difficult if it is a basic one.

Resetting password on Linux Mint

Let’s see the steps for updating a user’s password on Linux Mint. The console will be utilized frequently. Don’t worry; it’s not that difficult. Just be sure to follow each instruction properly.

1. Password Policy

It’s crucial to review the password policies if you’ve opted to alter the system password, no matter the motivation. Although most of you already know this, privacy is becoming increasingly difficult in today’s environment. To keep your system secure, be sure to select a strong password. A strong password adheres to the following guidelines:

  1. Password length: Your password must be at least eight characters long (the higher it is, the better).
  2. Memorable: No matter how long your password is, it is useless if you can’t remember it. So make sure your brain has your password hard-coded in.
  3. Character selection: Uppercase letters, lowercase letters, special characters, and numerals should all be present in the password.
  4. Your password should not contain the following items by any chance:
    • Popular passwords (11111, abcde, dragon, 12345, admin, 654321, and others).
    • Common proper names, email addresses, your name, login IDs, or any other information that is easy to guess must NOT be included in your password.
    • No matter how strong the password is, never use a password already used.

2. Ethics

The techniques listed below can be used to take control of other people’s user accounts and carry out any criminal action without the victim’s knowledge. Because of this, it’s critical to comprehend what you’re about to perform and the effects it will have.

Resetting the password

Four alternative methods can be employed to change the password in your Linux Mint OS:

  1. The boot console.
  2. The general console.
  3. The Recovery mode
  4. The GUI (Graphical User Interface) method

Method 1: Using the General console to reset your Linux Mint Password

Before beginning, you must understand the distinction between sudo and the root user. Do not combine these two distinct admins.

The root user is the current administrator or the account owner who created the administrator account. Unlike sudo, a regular user can do administrative activities. This enables the user to do actions as a root user with sudo capabilities (account credentials) that regular users cannot.

Let’s see how to alter passwords using sudo and root permission:

Modifying a user’s password using sudo permission

To change or reset a user’s password using sudo permission, follow the steps provided herein to the latter.

Sign in to your user account first.

After logging in, launch the terminal and execute the following command.

sudo passwd

Initially, it would be best if you input the system’s current password. However, you are now required to enter the new password you intend to change. In addition, you must enter the new password again for verification. If no errors occur, the process will provide a success message.

update sudo password

Update sudo password

Modifying a user’s password using Root permission

This method works if you have previously altered your password at least once. Execute the following command and enter the current password:

su root

Once you have gained root access, enter passwd in the terminal and press enter:

passwd

Enter the new password that you wish to retain. Next, re-enter the password you changed in the New Password field and press enter:

update root password

Update root password

That’s it. The password has been correctly updated on Your Linux Mint OS

Method 2: Use the boot console to change your Linux Mint password

This is by far the most effective method for changing and resetting the Linux Mint user password. However, exercise caution; it involves changing vital system components.

This strategy is highly effective. But, technically, it can even change the password for the “root” account, rendering the entire system inoperable. So if you’re a system administrator, ensure a backup.

Reboot your system. When the system begins to boot, press and hold the Shift key.

You have entered the GNU GRUB boot menu successfully.

Carefully type “e” to select the default choice. My operating system is Linux Mint 21.1 Cinnamon.

enter gnu grub boot

Enter GNU Grub boot

Using the arrow keys, move to the end of the line that reads “linux /boot/vmlinuz-” (without quotes, of course).

navigate to the linux :boot:vmlinuz

Navigate to the linux /boot:vmlinuz-

Enter the following code after “quiet splash.

rw init=/bin/bash
add command after quiet splash

Add command after quiet splash

Press F10 when everything is ready. This will restart the system with the modified configuration. The result will be displayed on the console.

Modifying user password

To change the password for the default user, Run the following command.

passwd <username>
change fosslinux password

Change fosslinux password

Again, you must enter and re-enter a new password for the target user’s account.

Modifying the root password

This command tells “passwd” to work with the “root” account.

passwd root
change root password

Change root password

Enter and re-enter the new password, as previously.

Reboot the system and log into the user account after completing the process.

Method 3: Using the Recovery mode to change your Linux Mint password

This is an alternative route available from the previous step. To use this method, do the following:

Reboot the system to get the GRUB menu.

Choose “Advanced options for Linux Mint 21.1 Cinnamon” and press Enter.

advanced options for linux mint

Advanced options for Linux Mint

Navigate to “Linux Mint 21.1 Cinnamon, with Linux 5.15.0-57-generic (recovery mode.)”

linux mint recovery mode

Linux Mint Recovery mode

You will arrive at the following screen with multiple alternatives. Choose “root”

select root

Select root

To continue, you’ll be required to enter the “root” password.

If the password is accurate, “root” access to the system will be granted.

root access granted

Root access granted

Now, execute the “passwd” command to modify the target user account’s password.

passwd <username>
change fosslinux password

Change fosslinux password

That’s it. You have successfully reset your password using the recovery mode option.

Method 4: Using the GUI (Graphical User Interface) to change the user password in Linux Mint

Changing a password via the system’s user interface is remarkably convenient. To access Account Details, you must launch the application manager. You will obtain it by navigating to the icon for All Applications:

all application

All applications

You will see the account holder’s image, name, and password on the Account Details screen. In the Password field, click the concealed password with dots to reset it:

change password by clicking the dots

Change your password by clicking the dots

Once you click, a Change Password dialogue box will show on the screen:

change password window

Change password window

Input the current password for your Linux Mint system into the box labeled Current password. Then, enter the new password you wish to set in the next entry, retype the new password in the Confirm password tab, and click the Change button:

click change to change password

Click Change to change the password

The Linux Mint system password has been successfully changed.

Wrapping up

This brief guide has covered all the methods they are to know concerning the primary subject: resetting the password on our Linux Mint OS. You can use any sorted alternative ways to complete the password reset process. If you are new to Linux and are uncomfortable using the command-line methods, then you can opt for the graphical user interface method. I hope you are now in a position to reset your Linux Mint password.

You may also like

2 comments

Erik P April 17, 2023 - 5:01 AM

Thanks man. This saved my life. Some malicious code on internet dropped me out of the sudo user group so I could no longer get admin rights (though it was asking for root password which I didn’t have. The console method worked perfectly for me. So grateful… I thought the days of bricking my linux system were over, ah ah.

Reply
Time for Fedora 40? May 8, 2024 - 1:49 PM

/var/log/cups/error_log has eaten all the space on / — it’s 14GB!
sudo returns whenever I try to use it:
/usr/bin/sudo must be owned by uid 0 and have the setuid bit set (? and fix it w/out root?)
Trying to use the root password (only ever set once):
su root
Password:
su: Authentication failure

I tried Timeshifting the 2nd most recent image, but the system is still in the same place. Maybe if I rm -r some of the system so there’s enough space to restore successfully? 21.3 Mint has been a nice system up to now. I’d hate to wipe it out with an attempted repair install….

Reply

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.