我需要从基于 windows 的代理迁移到 linux 代理。 在旧服务器中,Squid 使用 mswin_auth.exe 对 Active Directory 域的用户进行身份验证。为此,我的用户现在在浏览器弹出窗口中输入 ntdomain\username 以进行代理身份验证。
在linux Centos 服务器中squid 会使用basic_ldap_auth,在这种情况下用户不能输入ntdomain。我的用户改变旧习惯会很烦人。有没有办法自动从输入的用户名中删除 ntdomain?
在 squid.conf 我有
auth_param basic program /usr/lib64/squid/basic_ldap_auth -R -b "dc=ntdomain,dc=parentd,dc=it" -D "CN=squid,OU=Squid,OU=Sede,DC=ntdomain,DC=parentd,DC=it" -W /etc/squid/squid.adpwd -f sAMAccountName=%s -h vfdc1.ntdomain.parentd.it
...
external_acl_type ldap_group %LOGIN /usr/lib64/squid/ext_ldap_group_acl -R -b "dc=ntdomain,dc=parentd,dc=it" -D "CN=squid,OU=Squid,OU=Sede,DC=ntdomain,DC=parentd,DC=it" -W /etc/squid/squid.adpwd -f "(&(objectclass=person) (sAMAccountname=%u)(memberof:1.2.840.113556.1.4.1941:=cn=%g,OU=Squid,OU=Sede,DC=ntdomain,DC=parentd,DC=it))" -h vfdc1.ntdomain.parentd.it -S
提前致谢
最佳答案
在您的请求中使用 -K 选项(它从用户名中剥离 Kerberos 领域):
external_acl_type ldap_group %LOGIN /usr/lib64/squid/ext_ldap_group_acl -R -K -b "dc=ntdomain,dc=parentd,dc=it" -D "CN=squid,OU=Squid,OU=Sede,DC=ntdomain,DC=parentd,DC=it" -W /etc/squid/squid.adpwd -f "(&(objectclass=person) (sAMAccountname=%u)(memberof:1.2.840.113556.1.4.1941:=cn=%g,OU=Squid,OU=Sede,DC=ntdomain,DC=parentd,DC=it))" -h vfdc1.ntdomain.parentd.it一切都好。
关于linux - squid basic_ldap_auth 从用户名中剥离 nt 域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32611295/