How to Change Sudo Password on Ubuntu

Figuring out how to change sudo password on Ubuntu?

Changing passwords is a common task regardless of the operating system used. There are various reasons one may change passwords, with security and privacy being at the top of the pile. 

Linux, like any other operating system, provides its users with the opportunity of having multiple user accounts. However, there is only a single account that can be called the administrator, root, or in Linux terms, the “sudo” account.

The sudo account is the main administrative account to make wholesale changes to your computer system. Whether you want to add new software, delete previous software or make some configuration changes, you require the password for the sudo account. Essentially, only the person who has made the sudo account is in charge of the whole computer system. 

The sudo password must remain safe and private. If you are using Ubuntu and want to know how to change sudo passwords, then you are at the right place. This article will guide you through how to change your sudo password on Ubuntu.

So, hang on tight, and let’s start!


Method 1: Changing the Sudo Password Using Command Terminal.

The command terminal is the place where a Linux user performs most of the tasks. Coincidentally, the command terminal is where the user is prompted to enter their sudo password most of the time. 

There are two ways a user can change the sudo password using the command terminal. We will be explaining both ways in this read. Let us have a look at the first method you can use. Follow these steps.

  1. Open the Command Terminal on your Ubuntu system. 
  2. Next, type in the following command.
$ sudo passwd root 
  1. When you press enter after typing the above-mentioned command, it produces a query for the system to change your sudo password. As a response, you will be first required to enter the new sudo password.
  2.  Next, you have to confirm your new password. After entering and confirming your new password, you should receive an output like this. 

In the second method, we use the $passwd command again but differently. Follow these steps to change your sudo password. 

  1. Open the Command Terminal
  2. Enter and execute the following command. 
$ sudo -i
  1. Next, you will have to enter your sudo password. After that, you will be logged in to your sudo account as the root user. 
  1. Next, type in this command. 
$ passwd
  1. Again, you will be prompted to enter your new sudo password and then confirm it. You should see this as an output on your terminal screen. 
  1. Next, type in the following command to exit to your root login session.
$ exit

These are the 2 ways you can change the sudo password using the command terminal. 


Method 2: Changing the Sudo Password Using the GUI.

The next method we will be discussing is much easier than the above two ways. We will explain how you can change the sudo password using the GUI of Ubuntu. Follow these steps to change your sudo password. 

  1. Open the settings application on your Ubuntu system. 
  2. Locate the “details” option. 
  3. Click on the “user” settings. 
  1. When you go to the user settings, you should see the following information on your screen.
  1. Next, click on the password bar. Once you click on it, you should see the following options pop up on your screen.
  1. This is where you can change your sudo password. First, enter the current sudo password. Next, enter the new password and then confirm it. Finally, click on change on the top-right of the prompt to save your new sudo password. 

These were the different methods on how to change your sudo password on Ubuntu. 

As we discuss passwords and administrative/root accounts on Ubuntu, let’s discuss the Certificate of Authority. A certificate of Authority or CA is a virtual certificate that can be issued online to different parties. It is a sign of trust between the party issuing the CA and the party receiving the CA. 

Using CA, users can create relations of trust between the server and client systems over the internet.  You can also configure your system to prevent clients from forming an online connection without a CA. 

If you want to know how to create a Certificate of Authority on Ubuntu, click on this link. The link will take you to a comprehensive guide that describes the steps you can follow to create a system of issuing CAs online. 

This was an article on how to change the sudo password on Ubuntu. We looked at the two methods, i.e., using the command terminal and the GUI to change the sudo password. It is important that the sudo password isn’t compromised; thus, regularly changing the sudo password can prove very useful. 

We hope that we were able to help you with your query and you now have a clear idea of how to change the sudo password on your Linux system. For further queries, please let us know in the comments. 

If this guide helped you, please share it😊

Author

Leave a Reply

Your email address will not be published. Required fields are marked *