免费注册 查看新帖 |

Chinaunix

广告
  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1364 | 回复: 0
打印 上一主题 下一主题

squid ldap认证(AD) [复制链接]

论坛徽章:
1
金牛座
日期:2013-11-29 16:30:52
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-01-07 15:30 |只看该作者 |倒序浏览
squid的Ldap认证(AD),因为AD不允许匿名LDAP查询,所以需要有一个可查询的AD帐号,
man squid_ldap_auth 的解释
If  you  want to search for the user DN and your directory does not allow anonymous searches then you must also use the -D and -w flags to specify a user DN and password to log in as to perform the searches, as in the  following complex Active Directory example
   
squid_ldap_auth -P -R -b "dc=your,dc=domain" -D "cn=squid,cn=users,dc=your,dc=domain"
-w "squidpasswd" -f "(&(userPrincipalName=%s)(objectClass=Person))" -h ad_ip

使用userPrincipalName,所以
[email=userid=userid@your.domain]userid=userid@your.domain[/email]
使用sAMAccountName,所以使用userid
-b basedn
-D binddn with -w
使用前测试AD是否工作正常
ldapsearch -x -b "cn=manager,dc=your,dc=domain" -D "cn=manager,dc=your,dc=domain" -w "managerpasswd" -h ad_ip
也可以使用
ldapsearch -x -b "dc=your,dc=domain" -D "cn=manager,dc=your,dc=domain" -w "managerpasswd" -h ad_ip
显示所有user

squid设置

auth_param basic program /usr/lib/squid/squid_ldap_auth -P -R -b "dc=your,dc=domain" -D "cn=ldaptest,cn=users,dc=your
,dc=domain" -w "passwd" -f "(&(userPrincipalName=%s)(objectClass=Person))" -h ip
auth_param basic children 5
auth_param basic realm squid auth system
acl ldapauth proxy_auth REQUIRED
http_access allow ldapauth


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/89897/showart_1779716.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP