免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2172 | 回复: 2
打印 上一主题 下一主题

[Web] htpasswd 的 bug [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-11 01:21 |只看该作者 |倒序浏览

  1. [bob@monitor bob]$ /usr/bin/htpasswd /tmp/pass bob
  2. New password:
  3. Re-type new password:
  4. Adding password for user bob
  5. [bob@monitor bob]$ ll /tmp/pass
  6. -rw-r--r--    1 root     root            0  2月 11 01:14 /tmp/pass
  7. [bob@monitor bob]$
复制代码


这样都不报错?

EXIT STATUS
       htpasswd  returns  a  zero status ("true") if the username and password
       have been successfully added or updated in  the  passwdfile.   htpasswd
       returns 1 if it encounters some problem accessing files
, 2 if there was
       a syntax problem with the command line, 3 if the password  was  entered
       interactively  and the verification entry didn't match, 4 if its opera-
       tion was interrupted, 5 if a value is  too  long  (username,  filename,
       password,  or  final  computed  record), and 6 if the username contains
       illegal characters (see the RESTRICTIONS section).


和 man 中说的明显不一样嘛

[ 本帖最后由 ailms 于 2008-2-11 15:19 编辑 ]

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
2 [报告]
发表于 2008-02-11 11:05 |只看该作者
你期望出什么错呢?

可以为空密码。

论坛徽章:
0
3 [报告]
发表于 2008-02-11 15:13 |只看该作者
原帖由 HonestQiao 于 2008-2-11 11:05 发表
你期望出什么错呢?

可以为空密码。


和密码无关,小乔难道没有看到喔文件是只有 root 可写的吗?

htpasswd 竟然不提示错误?甚至 htpasswd /tmp bob 也不会报错
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP