|
在debian etch里面的passwd包版本为:
ii passwd 4.0.18.1-7 change and administer password and group dat
在man文档中规定设置帐户密码最小期限的描述如下:
-m, --mindays MIN_DAYS
Set the minimum number of days between password changes to MIN_DAYS. A value of zero
for this field indicates that the user may change his/her password at any time.
结果我在命令行下输入:
debian:~# passwd -m 2 debian
passwd: invalid option -- m
Usage: passwd [options] [LOGIN]
Options:
-a, --all report password status on all accounts
-d, --delete delete the password for the named account
-e, --expire force expire the password for the named account
-h, --help display this help message and exit
-k, --keep-tokens change password only if expired
-i, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-l, --lock lock the named account
-n, --mindays MIN_DAYS set minimum number of days before password
change to MIN_DAYS
-q, --quiet quiet mode
-r, --repository REPOSITORY change password in REPOSITORY repository
-S, --status report password status on the named account
-u, --unlock unlock the named account
-w, --warndays WARN_DAYS set expiration warning days to WARN_DAYS
-x, --maxdays MAX_DAYS set maximim number of days before password
change to MAX_DAYS
大家注意了.这个错误说是没有-m选项,有趣的是,下面提示-n选项和-m一样.我怀着有才的心情try了一下:
passwd -n 2 debian
居然成功了.
如下:
debian:~# chage -l debian
Last password change : Jun 15, 2007
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
debian:~# passwd -n 3 debian
Password changed.
debian:~# chage -l debian
Last password change : Jun 15, 2007
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 3
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7
--------------------------------------------------------------
酷!Unix学风.
到咱Q群论道先
33523191
嘎嘎来.
-------------------------------------------------------------- |
|