cmdxray / commands / passwd

What does passwd do?

change a user's password (and password-aging settings).

▸ Explain your own passwd command →

passwd examples, explained

$ passwd

  • passwdchange a user's password (and password-aging settings)

$ passwd alice

  • passwdchange a user's password (and password-aging settings)
  • alicean argument passed to the command

$ passwd -S bob

  • passwdchange a user's password (and password-aging settings)
  • -Sshow password status (locked/usable, last change)
  • boban argument passed to the command

$ passwd -l svc

  • passwdchange a user's password (and password-aging settings)
  • -llock the account's password (prefix it with !)
  • svcan argument passed to the command

passwd flags & options

-llock the account's password (prefix it with !)
-uunlock a locked password
-ddelete the password, leaving the account passwordless
-eexpire the password now, forcing a change at next login
-Sshow password status (locked/usable, last change)
-awith -S, report status for all accounts
-nminimum days between password changes
-xmaximum days a password stays valid
-wdays of warning before a password expires
-idays after expiry until the account is disabled

Other commands

Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.