Alias /mysecret "/usr/local/mysecret"
<Directory /usr/local/mysecret>
AuthType Basic
AuthName "login"
AuthLDAPURL "ldap://192.168.0.9/dc=extmail.org"
require valid-user
</Directory>
Feb 20 14:02:17 mail slapd[4591]: conn=13 fd=10 ACCEPT from IP=192.168.0.9:32904 (IP=0.0.0.0:389)
Feb 20 14:02:17 mail slapd[4591]: conn=13 op=0 BIND dn="" method=128
Feb 20 14:02:17 mail slapd[4591]: conn=13 op=0 RESULT tag=97 err=0 text=
Feb 20 14:02:17 mail slapd[4591]: conn=13 op=1 SRCH base="dc=extmail.org" scope=2 deref=3 filter="(&(objectClass=*)(uid=liu))"
Feb 20 14:02:17 mail slapd[4591]: conn=13 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
Feb 20 14:02:17 mail slapd[4591]: conn=13 op=2 BIND dn="mail=liu@extmail.org,virtualDomain=extmail.org,o=extmailAccount,dc=extmail.org" method=128
Feb 20 14:02:17 mail slapd[4591]: conn=13 op=2 RESULT tag=97 err=49 text=
Feb 20 14:02:17 mail slapd[4591]: conn=13 op=3 UNBIND
Feb 20 14:02:17 mail slapd[4591]: conn=13 fd=10 closed
192.168.0.2 - liu [20/Feb/2009:14:00:52 +0800] "GET /mysecret HTTP/1.1" 401 478 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
192.168.0.2 - liu [20/Feb/2009:14:02:17 +0800] "GET /mysecret HTTP/1.1" 401 478 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)"
[Fri Feb 20 14:00:52 2009] [warn] [client 192.168.0.2] [5123] auth_ldap authenticate: user liu authentication failed; URI /mysecret [ldap_simple_bind_s() to check user credentials failed][Invalid credentials]
[Fri Feb 20 14:02:17 2009] [warn] [client 192.168.0.2] [5124] auth_ldap authenticate: user liu authentication failed; URI /mysecret [ldap_simple_bind_s() to check user credentials failed][Invalid credentials]
原帖由 xtykc09 于 2009-3-6 16:18 发表
我刚刚做成功过,但我也是新手,这里写了一个总结,Apache的LDAP认证详解:http://www.dlresearch.cn/xtykc/?p=42
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |