htdigest的领域是什么?

时间:2011-11-26 04:12:54

标签: apache

htdigest需要以下参数:

Usage: htdigest [-c] passwordfile realm username

领域是什么?我应该使用什么值来设置htdigest?

3 个答案:

答案 0 :(得分:4)

无论如何,realm表示chalenge-response的认证域。在digest身份验证的情况下,realm值参与密码哈希,这就是存储密码文件时需要它的原因。

有关详细信息,请参阅http://tools.ietf.org/html/rfc2617#section-3.2.1

答案 1 :(得分:1)

通常领域与.htaccess中的authname相同,因为它会在提示登录和密码时显示

即:

<Location /prived/>
AuthName "Prived zone"
AuthType Digest
AuthUserFile /var/www/authfile/priveduser
AuthGroupFile /var/www/authfile/privedgroup
AuthDigestDomain /prived/ /protect/
Require group valid-users
</Location>

htdigest -c / var / www / authfile / priveduser“Prived zone”titi

答案 2 :(得分:0)

使用htdigest创建密码时,&#39;领域&#39;需要匹配&#39; AuthName&#39; Apache配置中的指令。

例如,如果您的摘要配置包含:

AuthName abc1234xyz

然后用于创建用户的htdigest命令将如下所示:

htdigest /path/to/digestfile abc1234xyz username