SVN with LDAP authentication not working

为君一笑 提交于 2019-12-22 12:39:39

问题


I'll first start with my setup. For this we have 2 servers

Server1 is going to be used for all the sourcecode, files, etc.., And on Server2 we have all our user information and logins. Both servers are running on Centos 6.4

Now we want to setup a SVN repository on server1 thats working with apache (httpd) and has a LDAP authentication that uses accounts from server 2.

Previously i set up a CVS repo aswel so i'm 100% sure ldap is working.

My SVN repo is working as it should with apache, but i just can't seem to set my ldap authentication correctly.

I've been looking for a few days now and i don't know what to do anymore.

My /etc/httpd/conf.d/subversion.conf looks like the following

<Location /svn>

    DAV svn
    SVNPath                 /var/www/svn/testProject
    AuthType                Basic
    AuthName                "My repo"
    AuthzLDAPAuthoritative  on
    AuthLDAPURL             "ldap://192.168.1.2:389/cn=users,dc=server2,dc=intranet,dc=myCompany,dc=com?sAMAccountName?sub?(objectClass=*)" NONE
    AuthUserFile            /var/www/svn-auth-conf
    Require valid-user
    #AuthzSVNAccessFile     /var/www/svn-acces-control

my /etc/openldap/ldap.conf on server1 looks like this

REFERRALS off
TLS_CACERTDIR /etc/openldap/cacerts
URI ldap://macserver.intranet.zappware.com
BASE cn=users,dc=server2,dc=intranet,dc=myCompany,dc=com

On server1 i have root access so i am able to setup it up correctly. When i go to Server2 on my user account i can do a ldapsearch like this

userM$ ldapsearch -x -b cn=users,dc=server2,dc=intranet,dc=myCompany,dc=com

I get all the user accounts on that server

but when i try ldapsearch -x -b cn=users,dc=server2,dc=intranet,dc=myCompany,dc=com -W sAMAccount Server2 asks me for the LDAP password. But i don't have that password, and our previous IT manager who did all the server stuff, has left the company.

so i thought i could just make another password and put in in the

/etc/openldap/slapd.conf

but when i check that file on server 2 its just empty

Hopefully there is someone who could give me some new and helpfull tips on how to solve this


回答1:


Ok i solved it

Changed my LDAPURL cause there was no need for me to bind it.

    <Location /svn>

        DAV svn
        SVNPath                 /var/www/svn/testProject
        AuthBasicProvider       ldap
        AuthType                Basic
        AuthName                "My repo"
        AuthzLDAPAuthoritative  off
        AuthLDAPURL             "ldap://192.168.1.2:389/cn=users,dc=server2,dc=intranet,dc=myCompany,dc=com" NONE
        Require valid-user
</Location>

I forgot to declare the AuthBasicProvider ldap

hope this can be useful to others



来源:https://stackoverflow.com/questions/16016735/svn-with-ldap-authentication-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!