LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 960|回复: 5

[BUG] 发现一个passwd的man文档描述错误,我太有才了!

[复制链接]
发表于 2007-6-17 09:18:32 | 显示全部楼层 |阅读模式
在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
嘎嘎来.
--------------------------------------------------------------
发表于 2007-6-17 14:09:56 | 显示全部楼层
有意思。。。你还真是较真哦,学习态度贼好哦。
回复 支持 反对

使用道具 举报

发表于 2007-6-17 22:19:06 | 显示全部楼层
MD,不小心发了二次。不好意思
回复 支持 反对

使用道具 举报

发表于 2007-6-17 22:20:29 | 显示全部楼层
态度很不错。
ii  passwd                   4.0.14-4                 change and administer password and group data
我使的这个版本没有错误。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-6-19 06:54:44 | 显示全部楼层
我想知道向谁发邮件可以报告这个BUG啊...我会注明我是中国人的.
回复 支持 反对

使用道具 举报

发表于 2007-6-20 21:08:33 | 显示全部楼层
难道MAN没说向哪里报告吗
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表