How to Change User Password in Ubuntu (original) (raw)
It’s always a good idea to update your password on a regular basis and use a unique password for each account.
As a regular user in Ubuntu you can only change your own password. The root user and users with sudo privileges can change another user’s passwords and define how the password can be used or changed.
This tutorial describes how to change a user password in Ubuntu from the command line, or through the Ubuntu GUI.
Ubuntu Change Password from Command Line
In Ubuntu and other Linux distributions you can change the password of a user account with the passwd
command.
To change your user account password run the passwd
command without any options:
passwd
You will be prompted to enter your current password. If the password is correct, then you will be asked to enter and confirm the new password.
Changing password for linuxize.
(current) UNIX password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Password is not shown on the screen when you type it.
The next time you login to your Ubuntu machine, use the new password.
Change Another User’s Password
The user you are logged in as must have sudo privilegesto be able to change or reset another user’s passwords.
To change the password of another user account, run the passwd
command followed by the username. For example, to change the password of a user named sansa
, run the following command:
sudo passwd sansa
You will be prompted to enter and confirm the new password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Ubuntu Change Password from GUI
If the command-line is not your thing, you can reset your user password through the GUI.
Gnome is the default desktop environment in Ubuntu 18.04 (Bionic Beaver). Previous versions of Ubuntuused Unity as the default desktop environment.
Follow the steps below to change your user password:
- Open the system Settings window by clicking on the Settings icon as shown in the image below.
- In the system settings window click on the Users tab.
If you want to change other users passwords you need to Unlock the panel which requires sudo (administrator) privileges. - Open the Change Password window by clicking on the
·····
input, next toPassword
. - Enter your current password, then enter and verify the new password.
To automatically generate a random password, click on the double gear icon, next toNew Password
. - Click
Change
to save the new password.
That’s it! You have successfully changed the password.
Conclusion
In this tutorial, you learned how to change users passwords in Ubuntu.
When changing the password make sure you’re using strong and unique password. Having a strong password is the most important aspect of the security of your account. Often a strong password has at least 16 characters, use at least one uppercase letter, one lowercase letter, one number and one special character.
If you like our content, please consider buying us a coffee.
Thank you for your support!
Sign up to our newsletter and get our latest tutorials and news straight to your mailbox.