配置过程:
编辑squid.conf(sudo gedit /etc/squid3/squid.conf),在auth_param标签下输入以下内容:
auth_param basic program /usr/lib/squid3/squid_ldap_auth-u -cn -R
-b "dc=example,dc=com"
-D"cn=test001,cn=Users,dc=example,dc=com"
-w "test001"
-f sAMAccountName=%s -h 192.168.16.16
(以上排版只为容易理解,每个参数后面只能是空格,不能使制表符或者回车)
-u 指定包含用户名登陆的DN属性名字
-b 指定查询的DN
-D 指定登陆查询ldap用户名test001所在DN
-w pilot01的密码
-f ldap 搜索过滤用户的DN
-h 指定ldapserver 地址
auth_param basic children5 验证进程数目
auth_param basic realm Squid_auth指定用户输入用户名和密码看到的文本文文件
auth_param basic credentialsttl 15 minutes指定用户多少时间验证时间
在acl标签下,键入如下内容:
acl ldapauth proxy_authREQUIRED 定义ldapauth一个acl对象,需要密码验证
在http_access 标签下,输入:
http_access allowldapauth 允许所有通过验证用户
http_access deny all 放在这个标签的最后位置,默认已经有了。
转载于:https://blog.51cto.com/jin771998569/1409923