passwd [options] [user]

Create or change a password associated with a user name. Only the owner or a privileged user may change a password. Owners need not specify theiruser name. Users can change their own passwords. For any other operation, you must be root.


-d, –delete

Delete the password for the user’s account.

-f, –force

Force the operation. Overrides -u.

-?, –help

Display a help message describing the options. See also –usage.

-i days, –inactive=days

Set the number of days after a password has expired before the account is disabled.

-k, –keep-tokens

Keep passwords (authentication tokens) that have not expired.

-l, –lock

Lock the user’s account.

-n days, –minimum=days

Set the minimum number of days that the password is valid.

-S, –status

Print the status of the user’s password.


Read new passwords from standard input.

-u, –unlock

Unlock the user’s account


Display a brief usage message. See also –help.

-w days, –warning=days

Set the number of days of warning users will get before their password expires.

-x days, –maximum=days

Set the maximum number of days that the password is valid

Post By Gishore J Kallarackal (2,121 Posts)

Gishore J Kallarackal is the founder of techgurulive. The purpose of this site is to share information about free resources that techies can use for reference. You can follow me on the social web, subscribe to the RSS Feed or sign up for the email newsletter for your daily dose of tech tips & tutorials. You can content me via @twitter or e-mail.

Website: → Techgurulive