我有一些问题获得SVN身份validation与LDAP /活动目录。 我的SVN安装工作正常,但在我的apache虚拟主机启用LDAP后,我无法让我的用户进行身份validation。
我可以使用select的LDAP浏览器成功连接到Active Directory,但似乎无法得到这个工作。
我的虚拟主机文件如下:
<VirtualHost *:80> ServerAdmin [email protected] ServerAlias svn.domain.local ServerName svn.domain.local DocumentRoot /var/www/svn/ <Location /test> DAV svn #SVNListParentPath On SVNPath /var/local/svn/test AuthzSVNAccessFile /var/local/svn/svnaccess AuthzLDAPAuthoritative off AuthType Basic AuthName "SVN Server" AuthBasicProvider ldap AuthLDAPBindDN "CN=adminuser,OU=SBSAdmin Users,OU=Users,OU=MyBusiness,DC=domain,DC=local" AuthLDAPBindPassword "admin password" AuthLDAPURL "ldap://192.168.1.6:389/OU=SBSUsers,OU=Users,OU=MyBusiness,DC=domain,DC=local?sAMAccountName?sub?(objectClass=*)" Require valid-user </Location> CustomLog /var/log/apache2/svn/access.log combined ErrorLog /var/log/apache2/svn/error.log </VirtualHost>
在我的error.log,我似乎没有得到任何绑定错误(我应该在其他地方?),但只是以下几点:
[Thu Jun 21 09:51:38 2012] [error] [client 192.168.1.142] user alex: authentication failure for "/test/": Password Mismatch, referer: http://svn.domain.local/test/
在“AuthLDAPURL”的末尾,我看到有人使用TLS和NONE,但对我来说似乎都没有帮助。
我已经加载了ldap模块并进行了检查,因此我非常欢迎任何帮助。 谢谢
在服务器/etc/ldap/ldap.conf中将REFERRALS off ,然后重试。
尝试在url行中添加“NONE”:
AuthLDAPURL "ldap://192.168.1.6:389/OU=SBSUsers,OU=Users,OU=MyBusiness,DC=domain,DC=local?sAMAccountName?sub?(objectClass=*)" NONE
试试ldapsearch。 用你的主目录做一个.ldaprc :
HOST 192.168.1.6 BASE DC=domain,DC=local BINDDN CN=adminuser,OU=SBSAdmin Users,OU=Users,OU=MyBusiness,DC=domain,DC=local
用它:
ldapsearch -D "CN=adminuser,OU=SBSAdmin Users,OU=Users,OU=MyBusiness,DC=domain,DC=local" -W sAMAccountName=user
它会要求BindDN密码。
迭戈得到的点,因为它终于使我得到它的工作。 这可能是在虚拟主机中改变参数顺序的情况,但是这对我是有效的。 我也直接从LDAP GUI工具复制pipe理员用户DN,以确保我有正确的绑定细节:
<VirtualHost *:80> ServerAdmin [email protected] ServerAlias svn.domain.local ServerName svn.domain.local DocumentRoot /var/www/svn/ <Location /> DAV svn SVNParentPath /var/local/svn/ SVNListParentPath On AuthBasicProvider ldap AuthType Basic AuthzLDAPAuthoritative off AuthName "SVN Server" AuthLDAPURL "ldap://192.168.1.6:389/DC=domain,DC=local?sAMAccountName?sub?(objectClass=*)" NONE AUTHLDAPBindDN "CN=admin,OU=Admin Users,OU=Users,OU=MyBusiness,DC=domain,DC=local" AuthLDAPBindPassword ###### require valid-user </Location> </VirtualHost>
希望能帮助别人!
它可能不会直接回答你的问题,但你有没有考虑使用Subversion Edge ? 它是免费使用(AGPLv3许可证)。
正如你在这个截图中看到的,设置LDAP集成非常简单。 你甚至可以安装SSPI模块,虽然这需要一些手动工作。