我正在尝试将我的LDAP与专用于我的SVN存储库的Apache 2.4服务器相关联,所以我使用Apache mod dav_svn和authnz_ldap 。 LDAP可以自行正常工作。
我可以设法将服务器与pipe理员DN绑定,然后search我需要的用户。
连接时,如果用户不存在,这是一个[没有这样的对象]错误(耶!)。 但是,如果用户存在,即使密码正确,LDAP始终会返回[Invalid credentials]错误。
这里是Apache的error.log结束
[authnz_ldap:debug] [pid 9243:tid 2990508864] mod_authnz_ldap.c(516): [client ::1:46639] AH01691: auth_ldap authenticate: using URL ldap://my_ldap_ip:port/ou=aaaa,dc=company,dc=fr?uid?sub [ldap:debug] [pid 9243:tid 2990508864] util_ldap.c(379): AH01278: LDAP: Setting referrals to On. [authnz_ldap:info] [pid 9243:tid 2990508864] [client ::1:46639] AH01695: auth_ldap authenticate: user mr.myself authentication failed; URI /svn/ [ldap_simple_bind() to check user credentials failed][Invalid credentials] [auth_basic:error] [pid 9243:tid 2990508864] [client ::1:46639] AH01617: user mr.myself: authentication failure for "/svn/": Password Mismatch
这是我的configuration文件
<VirtualHost domain:443> ServerName domain SSLEngine On SSLCertificateFile /path/to/ssl/cert.pem SSLCertificateKeyFile /path/to/ssl/key.pem SSLProtocol all SSLCipherSuite HIGH:MEDIUM <Location /svn> DAV svn SVNParentPath /path/to/svn/repositories SVNListParentPath ON AuthType Basic AuthName "a nice message" AuthBasicProvider ldap AuthLDAPURL ldap://my_ldap_ip:port/ou=aaaa,dc=company,dc=fr?uid?sub AuthLDAPBindDN cn=mr-admin,ou=cccc,ou=bbbb,dc=company,dc=fr AuthLDAPBindPassword clear_password <RequireAll> Require valid-user Require ssl Require ldap-group cn=svngroup,ou=ffff,ou=eeee,ou=dddd,dc=company,dc=fr </RequireAll> </Location> </VirtualHost>
除了这个文件之外,我添加到Apache的唯一configuration是ports.conf中的“ Listen 443 ”
你有什么想法是什么问题? 我一直在寻找一段时间,我很快就需要这个工作。
感谢您的阅读(对于那个糟糕的英语感到抱歉)
——-编辑:额外的细节
这是我的整个代码
为了清楚起见,我只更改了域,path,DN名称和bindDN密码。
将uid更改为cn时,具有相同的结果
这是ldapsearch结果
。
ldapsearch -x -H ldap://my_ldap_ip:port/ -D cn=mr.myself,ou=gggg,ou=aaaa,dc=company,dc=fr -w 'p4(sSwo]rd' -v ldap_initialize( ldap://my_ldap_ip:port/??base ) ldap_bind: Invalid credentials (49) ldapsearch -x -H ldap://my_ldap_ip:port/ -D cn=mr.myself,ou=gggg,ou=aaaa,dc=company,dc=fr -w p4(sSwo]rd -v bash: syntax error near unexpected token "("
谢谢您的帮助。
这是一个有效的configuration,问题位于我们的LDAP。 我有我的密码重置,一切正常。