However, to avoid security attacks, it is necessary to change the root password regularly. Because resetting the password time to time helps you to get rid of these issues, even if your ex-team member finds your old password, they wouldn’t be able to access the system.
How to Change Root Password in Linux Mint 21
We have two most common ways to change root password on Linux Mint 21 system:
1: Change root Password with sudo Permission
With sudo privileges, a user can easily modify the root password if forgotten or even set it for the first time. But keep in mind, you should know about the older password. Whenever you run the mentioned command, the system will ask you to type the sudo password; type it and hit enter:
In the next move, you will be asked to type the new root password for the Linux mint system:
Re-enter the new root password you have set above for confirmation:
Once both passwords match, you will get a message on terminal that you have successfully updated Linux Mint root password.
2: Change root Password with root Permission
For this method, you should have changed the root password of the Linux Mint system at least one time before. And, you must know the current sudo password to gain root privileges. So, execute the mentioned command and type the current root password of your Linux system:
In the next command, execute the ‘passwd’ command to the terminal for further process. This will allow you to modify the root password:
Type the new password you want to set, and hit Enter:
Re-enter the password you have set above. You will receive a successfully updated message if the password is entered correctly:
3: Change root Password Using GUI
You can also change the root password through a graphical user interface if you don’t prefer the terminal.
What you need to do is, open the applications menu, move to the Administration icon and their select Users and Groups option:
Type the current root password and click to Authenticate button:
After authentication, you will see a user with their respective details like name and password. In the password category, click on the dotted hidden password to reset it:
Once you clicked, a dialogue box of Change Password will be appeared on the screen:
Type the new password of your choice in the New Password entry and re-write it on the Confirm Password tab. If your passwords match, then hit to Change button:
The root password of the Linux Mint 21 system has changed successfully.
Root password is the key to managing your whole Linux system as all administration tasks and queries are handled with root permission. Sometimes, it is necessary to change the root password after some time to avoid unnecessary usage and attacks.
Through this guide, we have learned how to change the root password on Linux Mint 21 system. We have done it using two different approaches, one approach leads to CLI which includes sudo and root permissions. And in the second approach, we used the GUI method.