Apache 身份验证: NTLM 单点登录

来自 Alpine Linux
此材料建议合并 ...

它应该与 Apache 合并。将所有内容放在一起似乎更合理 (讨论)

Apache 下的 NTLM 单点登录

注意: 本指南假定您已配置 Samba 并连接到 Windows 域

安装和配置

安装所需软件包

# apk add apache2 apache-mod-auth-ntlm-winbind

将 apache 用户添加到 winbind 组

# addgroup <user> winbind

添加到 httpd.conf (虚拟主机)

/etc/apache2/httpd.conf 的内容

# /etc/apache2/httpd.conf AuthType NTLM NTLMauth on NTLMAuthHelper "/usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp" Require user <users>

确保将所有需要身份验证的用户添加到最后一行。

或者,允许所有属于 winbind 域的有效用户,使用以下配置

/etc/apache2/httpd.conf 的内容

# /etc/apache2/httpd.conf AuthType NTLM NTLMauth on NTLMAuthHelper "/usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp -require-membership-of="WORKGROUP\Domain Users"" Require valid user

重启 Apache 并测试

# rc-service apache2 restart