Learn how to change user passwords in Ubuntu to improve the security of your system. As a regular user, you can only change your own password, while the root user and users with sudo privileges can change passwords for other users and set password policies.
It’s important to use a unique and strong password for each account, and to update your password regularly. This article provides step-by-step instructions for changing passwords through the terminal, and explains when it may be necessary to change a password in Ubuntu.
In this quick tutorial, I’ll show you the command line ways of changing passwords in Ubuntu.
Previously we have discussed the basic terminal commands on How to Copy Files using Terminal, now I want to continue with other tutorials. If you are new to Ubuntu, you may have trouble changing the user’s password on Ubuntu Ubuntu. Because the command must be entered in the terminal to do it. Password change can be due to security problems, of course it will be easier to change the password in Windows than Ubuntu.
Change user password in Ubuntu
Changing the password is one of the commands from the terminal. Maybe there are difficulties because you are still unfamiliar with ubuntu, you can follow the steps as follows.
- Open a terminal by clicking Home → type terminal → select terminal or also by pressing Ctrl + Alt + T.
- Then enter the command “sudo passwd” without quotes, then enter.
- Type the password that you are using, this is invisible (not visible) then enter.
- Then enter the new password (invisible) → enter.
- Type the new password again → enter.
- If there is already a statement “password updated successfully” means the user’s password has been successfully changed.
passwd Changing password for abhishek. (current) UNIX password: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
If you want to change a password for another user, you can also do that with the passwd command. But in this case, you’ll have to use sudo.
sudo passwd <user_name>
Conclusion
In this tutorial, you have learned how to change user passwords in Ubuntu.
When changing the 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 are at least 16 characters long, using at least one uppercase letter, one lowercase letter, one number and one special character.
read also : How to Check Ubuntu Version using Terminal