开发者

Configure OpenLDAP inside Ubuntu 10.04 server for svn user and group administration

After configuring apache2 and svn inside Ubuntu 10.04 serve I'm pretending to install OpenLDAP to use LDAP开发者_如何学JAVA protocol to configure and administrate users and groups with the svn repositories.

However it seems that OpenLDAP recently went through some modifications and the Ubuntu official documentation about OpenLDAP is out of date.

I found some forums and blogs giving methods to work with OpenLDAP but none of then uses the same algorithm for configuration so I'm not sure what is and what isn't appropriated to implement. Hopping to see some replies with reliable info about this.


I've just done the same thing. Here are the best links I could find:

http://tuxnetworks.blogspot.com/2010/06/howto-ldap-server-on-1004-lucid-lynx.html

http://albanianwizard.org/ubuntu-10-0-4-lucid-lynx-ldap-configuration-the-working-how-to.albanianwizard

I also found this script to convert OpenLDAP schemas into .ldif format (although I had to tweak the script a bit to get it to work):

http://blogs.oracle.com/Ludo/entry/opends_tips_adding_schema_from

Finally, I offer these two bash scripts which are based on the info in these links, and helped me when I was developing :)

#!/bin/bash
# reset_OpenLDAP.sh

if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root!" 1>&2
   exit 1
fi

aptitude -y purge slapd ldap-utils
cat /dev/null > /var/log/debug
rm /var/lib/ldap/*
rm  -rf /etc/ldap
apt-get -y install slapd ldap-utils

and

#!/bin/bash
# initialize_OpenLDAP.sh

if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root!" 1>&2
   exit 1
fi

ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif
python schema-convert.py <custom_schema>.schema | ldapadd -Y EXTERNAL -H ldapi:///

ldapadd -Y EXTERNAL -H ldapi:/// -f backend.ldif

ldapadd -x -D cn=admin,<BASE_DN> -W -f frontend.ldif

Hope this helps!


Not as yet. You can configure SVN to use LDAP auth via the cyrus sasl mechanism. Unfortunately, there's a problem with this and it won't work (for svnserve servers). There's a few bits on the web, but the devs have fixed the problem with sasl which will be released with SVN 1.7, IIRC.

For running Apache-based SVN, its easy. Add a few Auth* entries for mod_auth_ldap and you're done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜