linux - squid basic_ldap_auth 从用户名中剥离 nt 域

标签 linux authentication active-directory ldap squid

我需要从基于 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/

相关文章:

Django : login() within Sign In form clean() or in the view ?

windows - 系统错误1722。RPC服务器不可用。调用网络用户时

linux - Git 连接到 Active Directory

active-directory - 获取组及其子组的所有成员

c - shell命令如何执行

authentication - 使用 docker 设置 redis

Django 使用带有 djoser 的电子邮件身份验证进行登录

linux - VSCode 多光标 Lubuntu

php-fpm 和 dns 随机工作不正常

linux - 查看由数字表示的文件的特定行