- 论坛徽章:
- 0
|
不用直接编辑吧?那么麻烦?
man passwd
-n min Sets minimum field for name. The min
field contains the minimum number of
days between password changes for name.
If min is greater than max, the user can
not change the password. Always use this
option with the -x option, unless max is
set to -1 (aging turned off). In that
case, min need not be set.
-u Unlocks a locked password for entry
name. See the -d option for removing the
locked password, or to set a password to
allow logins.
-w warn Sets warn field for name. The warn field
contains the number of days before the
password expires and the user is warned.
This option is not valid if password
aging is disabled.
-x max Sets maximum field for name. The max
field contains the number of days that
the password is valid for name. The
aging for name is turned off immediately
if max is set to -1.
#passwd -w 30 -x 31 user1 用来30天就通知更改。 |
|