How to Change User Password in Ubuntu – Like other operating systems, to enter the system we are required to create a password. Password is the first security gateway that must exist in every system. And it’s always a good idea to regularly update your passwords and use unique passwords for each account.
As a normal user on Ubuntu you can only change your own password. The root user and user with sudo privileges can change other users’ passwords and define how they can be used or changed.
This tutorial explains how to change a user password in Ubuntu from the command line, or through the Ubuntu GUI.
How to Change User Password from Command Line
In Ubuntu and other Linux distributions you can change the user account password with the command
To change your user account password, run the command
passwd without any options:
You will be asked to enter the current password. If the password is correct, you will be asked to enter and confirm a new password.
Output Changing password for verandalounge. (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
Note that the password you type is not displayed on the screen.
Now when you will log into your Ubuntu machine, use the new password as you have changed.
Change Other User’s Password
The user you are logged in with must have sudo privileges in order to change or reset another user’s password.
To change the password for another user account, run the command
passwd followed by username. For example, to change the password for a user named john, run the following command:
$ sudo passwd john
You will be asked to enter and confirm a new password:
Output Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
Change User Password from Ubuntu GUI
If the command line is difficult for you, you can reset your user password via the GUI display.
Gnome is the default desktop environment in Ubuntu 18.04 (Bionic Beaver). Previous versions of Ubuntu used Unity as the default desktop environment.
Follow the steps below to change your user password:
1. Open System Settings by clicking on the icon Settings as shown in the image below.
2. In the system setup window, click on the tab Users.
If you want to change another user’s password, you will need to unlock the panel which requires sudo (administrator) privileges.
3. Open the Change Password window by clicking on the input
·····, next to Password.
4. Enter Password your current password, then enter and verify the new password.
To automatically generate a random password, click on the icon overdrive double, next to New Password.
5. Click the button Change to save a new password.
And now you have successfully changed the user password in Ubuntu through the GUI display.
In this tutorial, you have learned how to change a user password in Ubuntu.
When changing your password, make sure you use a strong and unique password. Having a strong password is the most important aspect of your account security. Often strong passwords have at least 16 characters, using at least one uppercase letter, one lowercase letter, one number and one special character.