Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To change your own Linux password, open a terminal in your account and run passwd. To reset another user’s password, an administrator can run sudo passwd USERNAME. The exact prompts and accepted passwords depend on the system’s password policy and account setup.

Change your own Linux password

  1. Sign in to the account whose password you want to change, then open a terminal.
  2. Run passwd with no username.
  3. If the account already has a password, enter the current password when prompted.
  4. Enter the new password, then enter it again to confirm. The two entries must match and meet the computer’s configured password rules.

The passwd(1) shadow-utils manual describes the command as changing passwords for user accounts. A regular user can change their own password, but cannot use passwd OTHER_USER to reset someone else’s.

Reset another user’s password as an administrator

Use an account with administrative privileges. If that account is authorized to use sudo, run:

sudo passwd USERNAME

Replace USERNAME with the target account’s login name. Alternatively, run passwd USERNAME as root. The superuser can change another account’s password without knowing its previous password. Whether sudo is available and which accounts it authorizes depend on the system’s configuration.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Change passwords for multiple accounts

For batch updates to existing accounts, chpasswd reads username-and-password pairs from standard input, one per line, in user_name:password form. By default, the passwords are provided as clear text and encrypted through PAM. See the chpasswd(8) manual.

Because the input contains actual passwords, handle it as sensitive data. Avoid putting literal passwords in shell command history, scripts, logs, or process arguments; use a protected input method appropriate to your environment.

Why not use usermod -p for a plaintext password?

The -p option to usermod expects an already encrypted password, not a normal plaintext password. Its usermod(8) manual cautions against the option because command-line arguments may be visible in process listings. Use the interactive passwd command for an individual account, or a carefully protected chpasswd workflow for batch changes.

What to check if the password change fails

  • Policy rejection: The system may enforce password-quality rules through PAM. Try a password that satisfies your organization’s or distribution’s requirements.
  • Password aging: A minimum-age rule may prevent a password change at that time. The passwd manual documents password-age and warning settings; change them only when you are responsible for administering that policy.
  • Account source: Not every Linux account is managed locally. A network identity service or distribution-specific PAM configuration can change where credentials must be updated. The passwd manual notes, for example, that NIS users may need to change passwords on the NIS server.

The cited manuals describe shadow-utils 4.19.0, from a release tarball fetched on 2026-08-04. Distributions may ship other versions or configure PAM and password policies differently, so local prompts and behavior can vary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Password locking is not the same as disabling an account

passwd -l USERNAME locks the account’s password. It does not necessarily block every form of access: another authentication method, such as an SSH key, may still allow login. Treat password locking and fully disabling account access as different administrative actions.

Password changes normally belong to the account-management tools rather than manual edits to /etc/passwd, /etc/shadow, or PAM configuration files. Editing password hashes directly is not the standard way to change a user password.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.