有没有办法从命令行检查由 Apache 提供的工具 htpasswd 创建的文件的用户和密码?
您可以使用htpasswd
为此的工具。
# create htpasswd_file with user:password
$ htpasswd -cb htpasswd_file user password
Adding password for user user
# verify password for user
$ htpasswd -vb htpasswd_file user wrongpassword
password verification failed
$ htpasswd -vb htpasswd_file user password
Password for user user correct.
退出状态为0
为了成功,3
为了失败。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)