squid ldap认证(AD)
生活随笔
收集整理的這篇文章主要介紹了
squid ldap认证(AD)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?? 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,所以userid=userid@your.domain
?使用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
? 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,所以userid=userid@your.domain
?使用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
轉載于:https://blog.51cto.com/gary407568105/213668
總結
以上是生活随笔為你收集整理的squid ldap认证(AD)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 是什么狙杀了ERP实施成功?
- 下一篇: 珍惜机会,去爱你身边的人!生命的箴言