
In this Tutorial we are going to teach you How To Change The Default Password On Ubuntu Linux. To entering the Ubuntu environment, you need a default username and password and know how to change it, with the help of which you can easily enter Ubuntu.
Changing the Default Password On Ubuntu Server
Currently, If you are a regular user or even a system administrator, sometimes you want to change the default password of your account that you feel is at risk for security reasons. That’s why you need to know how to change your account password. In the following article, we have explained the steps to change the password.
Also, along with this educational article, we suggest you visit our Buy Linux VPS services.
How to Change the Password of the Current User on Ubuntu
First, to start changing your password, enter passwd and then the username using the following command:
passwd <username>
Also, after executing the desired command, enter the current password and after providing the current password, you need to set a new password for your account. Using the command in the image below:
How to Change the Password for Another User on Ubuntu
In this section, to change the password of an account other than your user account, you must go to the root account or use a standard account with sudo privileges. Do the following steps in order.
If you have access to the root account, change to it. Then enter the root password and you will be logged in as a root user:
su –
Now, using the desired command, change the password of the other user account by typing the passwd command and then the username:
passwd <username>
At this stage, if you have sudo privileges, change the password by typing sudo and then the passwd command and the username, with the help of the command below:
sudo passwd <username>
Then enter the sudo password and now you can change the password of any other user account. Enter the password using the command shown in the image and enter it again to confirm:
The desired output indicates that the new password has been updated successfully. Also, if you are not a root user and want to change the password of another user, you will see the notification in the following image:
How to Change Root User Password
To change the password for a root user, switch to the root account or use the standard account with sudo privileges. If you have access to the root account, change it using the following command:
su-
Then enter root account password and login as root user. You can now change the root account password using the following command:
passwd <username>
In this section you have sudo privileges, change the password by typing sudo and then passwd and root using the following command:
sudo passwd root
Then enter the sudo password, after which you will be prompted to set a new password for the root account. Enter the new password using the command shown in the image and then enter it again to confirm:
How To Change User Password via UI
To start, open the Settings tool using the right-click menu from the desktop. as shown below:
Now go to the Users tab from the left panel and click on the unlock button in the upper right corner, if you are changing the password of the current user, there is no need to unlock. Currently, to change the password for any other account, you must unlock it:
Type the password in the corresponding box in the image below and click the Authenticate button:
Then, according to the picture, select the desired user account to change the password and click on the Password section in the Authentication and Login section:
Now the desired box to change the password below will open. If you are changing the password for the current user, you must enter the current password, then enter the new password with the help of the image in the next fields to confirm it and re-enter it. When done, press the Change button:
Conclusion
In this Tutorial you learned How To Change The Default Password On Ubuntu Linux. By learning each of the mentioned methods and commands in this tutorial, which includes a few simple steps, you can easily change your Ubuntu Server password. We hope this article was useful for you.