Linux change user password

Last updated on

You can use passwd to change a password on behalf of a user. Just replace username with the user account you want to change.

sudo passwd username

The system will prompt you to enter a password. You can generate a password here. Passwords do not echo to the screen when you enter them.

You can also change the password of the currently logged in account by typing passwd (without specifying a username). You will be prompted to enter your old password for verification and then a new password.

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

Leave a reply

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