sudo apt-get install luma
2.vim /etc/ldab/slapd.conf
add rootdn cn=admin,dc=yourdomain
add rootpw flynetcn
3.
vim base.ldif
dn: ou=members,dc=yourdomain
ou: members
objectClass: organizationalUnit
dn: ou=groups,dc=yourdomain
ou: groups
objectClass: organizationalUnit
vim group.ldif
dn: cn=grp1,ou=groups,dc=yourdomain
cn: grp1
objectClass: groupOfUniqueNames
objectClass: top
uniqueMember: cn=user1,ou=members,dc=yourdomain
uniqueMember: cn=user2,ou=members,dc=yourdomain
dn: cn=grp2,ou=groups,dc=yourdomain
cn: grp2
objectClass: groupOfUniqueNames
objectClass: top
uniqueMember: cn=user3,ou=members,dc=yourdomain
uniqueMember: cn=user4,ou=members,dc=yourdomain
dn: cn=grp3,ou=groups,dc=yourdomain
cn: grp3
objectClass: groupOfUniqueNames
objectClass: top
uniqueMember: cn=user3,ou=members,dc=yourdomain
uniqueMember: cn=user2,ou=members,dc=yourdomain
vim user.ldif
dn: cn=user1,ou=members,dc=yourdomain
cn: user1
sn: USER1
uid: user1
userPassword: user1
objectClass: inetOrgPerson
dn: cn=user2,ou=members,dc=yourdomain
cn: user2
sn: USER2
uid: user2
userPassword: user2
objectClass: inetOrgPerson
dn: cn=user3,ou=members,dc=yourdomain
cn: user3
sn: USER3
uid: user3
userPassword: user3
objectClass: inetOrgPerson
dn: cn=user4,ou=members,dc=yourdomain
cn: user4
sn: USER4
uid: user4
userPassword: user4
objectClass: inetOrgPerson
4.ldapadd -x -W -c -D "cn=admin,dc=yourdomain" -f base.ldif
ldapadd -x -W -c -D "cn=admin,dc=yourdomain" -f group.ldif
ldapadd -x -W -c -D "cn=admin,dc=yourdomain" -f user.ldif
5.ldapsearch -x -b 'ou=members,dc=eryiju' '(cn=user2)'
6.ldappasswd -x -D 'cn=user1,ou=members,dc=yourdomain' -a 'user1' -s 'user2' 'cn=user1,ou=members,dc=yourdomain' -W
7.sudo apt-get install libapache2-svn
8. cd /etc/apache2/mods-enabled
sudo ln -s /etc/apache2/mods-available/dav_svn.load
sudo ln -s /etc/apache2/mods-available/ldap.load
sudo ln -s /etc/apache2/mods-available/authnz_ldap.load
9. vim /etc/apache2/site-availble/svn
DAV svn
SVNParentPath /usr/local/svn_root
AuthType Basic
AuthName "Subversion Repository"
AuthBasicProvider ldap
AuthzLDAPAuthoritative on
AuthLDAPURL ldap://localhost:389/ou=members,dc=yourdomain?sub?(objectClass=*)
#AuthLDAPBindDN "cn=admin,dc=yourdomain"
#AuthLDAPBindPassword "flynetcn"
AuthzSVNAccessFile /etc/apache2/svn-auth-file
Require valid-user
10.sudo /etc/init.d/apache2 reload