⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 squid_ldap_auth.8

📁 一个功能非常全面的代理服务器源代码程序,
💻 8
字号:
.TH squid_ldap_auth 8 "14 January 2005" "Squid LDAP Auth"..SH NAMEsquid_ldap_auth - Squid LDAP authentication helper..SH SYNOPSIS.B squid_ldap_auth-b "base DN" [-u attribute] [options] [ldap_server_name[:port]|URI]....br.B squid_ldap_auth-b "base DN" -f "LDAP search filter" [options] [ldap_server_name[:port]|URI].....SH DESCRIPTIONThis helper allows Squid to connect to a LDAP directory tovalidate the user name and password of Basic HTTP authentication.LDAP options are specified as parameters on the command line,while the username(s) and password(s) to be checked against theLDAP directory are specified on subsequent lines of input to thehelper, one username/password pair per line separated by a space..PAs expected by the basic authentication construct of Squid, afterspecifying a username and password followed by a new line, thishelper will produce either OK or ERR on the following lineto show if the specified credentials are correct according tothe LDAP directory..PThe program has two major modes of operation. In the default modeof operation the users DN is constructed using the base DN anduser attribute. In the other mode of operation a searchfilter is used to locate valid user DN's below the base DN...TP.BI "-b " "basedn " (REQUIRED)Specifies the base DN under which the users are located...TP.BI "-f " filterLDAP search filter to locate the user DN. Required if the usersare in a hierarchy below the base DN, or if the login name isnot what builds the user specific part of the users DN..IPThe search filter can contain up to 15 occurrences of %swhich will be replaced by the username, as in "uid=%s" forRFC2037 directories. For a detailed description of LDAP searchfilter syntax see RFC2254...TP.BI "-u " userattrSpecifies the name of the DN attribute that contains the username/login.Combined with the base DN to construct the users DN when no search filteris specified (-f option). Defaults to 'uid'.IPNote: This can only be done if all your users are located directly underthe same position in the LDAP tree and the login name is used for namingeach user object. If your LDAP tree does not match these criterias or ifyou want to filter who are valid users then you need to use a search filterto search for your users DN (-f option)...TP.BI "-U " passwordattrUse ldap_compare instead of ldap_simple_bind to verify the users password.passwordattr is the LDAP attribute storing the users password...TP.BI "-s " base|one|subsearch scope when performing user DN searches specifiedby the -f option. Defaults to 'sub'..IP.B baseobject only,.B onelevel below the base object or.BR sub treebelow the base object..TP.BI "-D " "binddn " "-w " passwordThe DN and password to bind as while performing searches. Required by the.BI -fflag if the directory does not allow anonymous searches..IPAs the password needs to be printed in plain text in your Squid configurationit is strongly recommended to use a account with minimal associated privileges.This to limit the damage in case someone could get hold of a copy of yourSquid configuration file...TP.BI "-D " "binddn " "-W " "secretfile "The DN and the name of a file containing the passwordto bind as while performing searches. .IPLess insecure version of the former parameter pair with two advantages:The password does not occur in the process listing, and the password is not being compromised if someone gets the squid configuration file without getting the secretfile...TP.BI -PUse a persistent LDAP connection. Normally the LDAP connectionis only open while validating a username to preserve resourcesat the LDAP server. This option causes the LDAP connection tobe kept open, allowing it to be reused for further uservalidations. Recommended for larger installations...TP.BI -OOnly bind once per LDAP connection. Some LDAP servers do notallow re-binding as another user after a successful ldap_bind.The use of this option always opens a new connection for eachlogin attempt. If combined with the -P option for persistentLDAP connection then the connection used for searching for theuser DN is kept persistent but a new connection is openedto verify each users password once the DN is found...TP.BI -Rdo not follow referrals..TP.BI "-a " never|always|search|findwhen to dereference aliases. Defaults to 'never'.IP.BI neverdereference aliases (default),.BI alwaysdereference aliases, only while.BR search ingor only to.B findthe base object..TP.BI -H " ldapuri"Specity the LDAP server to connect to by LDAP URI (requires OpenLDAP libraries).Servers can also be specified last on the command line...TP.BI -h " ldapserver"Specify the LDAP server to connect to. Servers can also be specified laston the command line..TP.BI -p " ldapport"Specify an alternate TCP port where the ldap server is listening ifother than the default LDAP port 389. Can also be specified within theserver specificiation by using servername:port syntax...TP.BI -v " 2|3"LDAP protocol version. Defaults to 2 if not specified...TP.BI -ZUse TLS encryption..TP.BI -S certpathEnable LDAP over SSL (requires Netscape LDAP API libraries)..TP.BI -c connect_timeoutSpecify timeout used when connecting to LDAP servers (requiresNetscape LDAP API libraries).TP.BI -t search_timeoutSpecify time limit on LDAP search operations..TP.BI -dDebug mode where each step taken will get reported in detail.Useful for understanding what goes wrong if the results isnot what is expected...SH EXAMPLESFor directories using the RFC2307 layout with a single domain, allyou need to specify is usually the base DN under where your usersare located and the server name:.IPsquid_ldap_auth -b "ou=people,dc=your,dc=domain" ldapserver.PIf you have sub-domains then you need to use a search filter approachto locate your user DNs as these can no longer be constructed direclyfrom the base DN and login name alone:.IPsquid_ldap_auth -b "dc=your,dc=domain" -f "uid=%s" ldapserver.PAnd similarily if you only want to allow access to users having aspecific attribute.IPsquid_ldap_auth -b "dc=your,dc=domain" -f "(&(uid=%s)(specialattribute=value))" ldapserver.POr if the user attribute of the user DN is "cn" instead of "uid" andyou do not want to have to search for the users then you could use somethinglike the following example for Active Directory:.IPsquid_ldap_auth -u cn -b "cn=Users,dc=your,dc=domain" ldapserver.PIf you want to search for the user DN and your directory does not allowanonymous searches then you must also use the -D and -w flags to specifya user DN and password to log in as to perform the searches, as in thefollowing complex Active Directory example.IPsquid_ldap_auth -P -R -b "dc=your,dc=domain" -D "cn=squid,cn=users,dc=your,dc=domain" -w "secretsquidpassword" -f "(&(userPrincipalName=%s)(objectClass=Person))" activedirectoryserver..SH NOTES.When constructing search filters it is strongly recommended to test the filterusing ldapsearch before you attempt to use squid_ldap_auth. This to verifythat the filter matches what you expect...SH AUTHORThis manual page was written by .I Henrik Nordstrom <hno@squid-cache.org>.Psquid_ldap_auth is written by .I Glenn Newton <gnewton@wapiti.cisti.nrc.ca>and.I Henrik Nordstrom <hno@squid-cache.org>..SH KNOWN ISSUESWill crash if other % values than %s is used in -f, or if more than 15 %sis used...SH QUESTIONSAny questions on usage can be sent to .IR "Squid Users <squid-users@squid-cache.org>" ,or to your favorite LDAP list/friend if the question is more related toLDAP than Squid...SH REPORTING BUGSReport bugs or bug-fixes to.I Squid Bugs <squid-bugs@squid-cache.org>or ideas for new improvements to .I Squid Developers <squid-dev@squid-cache.org>..SH "SEE ALSO".BR ldapsearch ( 1 ),.brYour favorite LDAP documentation.br.BR RFC2254 " - The String Representation of LDAP Search Filters,"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -