-d |
delete the password for the named account (root only)
also removes password lock if any
# passwd -d user
|
-l |
lock the password for the named account (root only)
# passwd -l user
|
-u |
unlock the password for the named account (root only)
|
-e |
expire the password for the named account (root only)
|
-x DAYS |
maximum password lifetime (root only)
# passwd -x 60 user
|
-n DAYS |
minimum password lifetime (root only)
# passwd -n 1 user
|
-w DAYS |
number of days warning users receives before password expiration (root only)
|
-i DAYS |
number of days after password expiration when an account becomes disabled (root only)
|
--stdin |
read new tokens from stdin (root only)
# echo password | passwd user --stdin
|
-S |
report password status on the named account (root only)
# passwd -S user
user PS 2009-09-12 0 99999 7 -1 (Password set, MD5 crypt.)
# What each field means
[Username]
[State : PS (Active); LK (password locked or not set)]
[Password last changed]
[Minimum password age (-n) = PASS_MIN_DAYS]
[Password Expiration (-x) = PASS_MAX_DAYS]
[Number of days warning before expiration (-w) = PASS_WARN_AGE]
[Number of days until the account expires and is disabled (-i)]
|