htdigest file format

末鹿安然 提交于 2019-11-29 07:48:59

echo by default adds a trailing new line:

echo -n a:b:c | md5

Should work as you expect.

Hm, I seem to have answered my own question. My test case was flawed, 'echo' is adding extra characters (not sure which). For instance

echo a:b:c | wc

gives 6 characters instead of 5. Calculating the hash at http://md5-hash-online.waraxe.us/ gives the correct value. Sorry everyone!

Here is how you set the password for a given user.

sudo htdigest /etc/apache2/.htdigest yourrealm.com yourusername
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!