Ubuntu

How to Change the Root Password on Ubuntu 20.04

How_to_Change_the_Root_Password_on_Ubuntu_20.04

Ubuntu is the one of the best Linux distros that can be installed on servers as well as desktop computers (PC). Ubuntu, which is based on Debian’s design have the access to several functions, one of which is changing the root password. Changing your passwords frequently reduces the likelihood of being hacked that will also make your system more secure.

Creating an account and password with root privileges is a crucial step in the installation process. Installing packages, upgrading the RPM package, and performing most system maintenance is all done with the root account, often called superuser. You have complete control over your system when you use the root account. Changing passwords is a good idea and thus should be updated frequently. Linux permits the creation of many user accounts, with its own password, the personal password of the user can be changed. Any account password can be changed by root users, even their own.

How to Change the Root Password of Ubuntu

If you’re switching from another Linux distro to Ubuntu, you might be wondering what the default root password is and how to alter it. By default, the root user account is deactivated in the Ubuntu system for security concerns. Below are the 3 ways to alter the root password of Ubuntu.

  • Change the Root Password of Ubuntu using Command Line
  • Change the Root Password of Ubuntu using passwd command
  • Change the Root Password of Ubuntu using Graphical User Interface

How to Change the Root Password of Ubuntu using the Command Line

Giving sudo capabilities to normal users encourages Ubuntu users to do system administration duties. Authorized users can run programs as another account, generally, the root user, using “sudo”. Run the mentioned below command to change the sudo password.

$ sudo passwd root

You’ll be asked to create and confirm a new password. The output will show that the password has been successfully updated.

Text Description automatically generated with medium confidence

How to Change the Root Password of Ubuntu using the passwd Command

In Ubuntu, the passwd command is used to update a user account password. The root user can change the password for an account on the system, but a normal user can only change his or her own account password.

Now firstly switch to root user by the below-mentioned command:

$ sudo -i

Graphical user interface Description automatically generated

Press Enter after typing your current password. You are now able to run commands as sudo user.

Now run the mentioned below command to alter the password.

$ passwd

Now enter your new password and confirm that password again.

Text Description automatically generated

Once the password is changed, log out of the root user by the below command.

$ exit

Graphical user interface Description automatically generated with medium confidence

How to Change the Root Password of Ubuntu using the Graphical User Interface

If you are a beginner and don’t know how to use the terminal, you can also change the password using Graphical User Interface.

Step 1: Open Setting

Open Activities overview, in the search bar type “setting” click on the setting icon and a new window will get open.

A screenshot of a computer Description automatically generated with medium confidence

Graphical user interface, application Description automatically generated

Step 2: Change Password

Click on the “Users” option on the left side, this displays all of the root user’s information, along with the password, but firstly unlock it to change the password by clicking on unlock button and then clicking on the password bar.

Graphical user interface, application Description automatically generated

A new pop-up window “Change password” will open, enter your current password then a new password, and then verify your new password and click on the “Change” button.

Graphical user interface, text, application, email Description automatically generated

Conclusion

Changing the password is a good habit as it prevents security thefts or can be changed for various reasons. Ubuntu provides the utility of changing the password in multiple ways, three of them are discussed in this article, change the password by Command-Line, using passwd command, and by Graphical User Interface. You can follow any of the approaches according to your requirement.

Similar Posts