在 Ubuntu 10.04 服务器内配置 OpenLDAP 以进行 svn 用户和组管理

发布于 2024-09-18 06:21:47 字数 258 浏览 15 评论 0原文

在 Ubuntu 10.04 服务器中配置 apache2 和 svn 之后,我假装安装 OpenLDAP 以使用 LDAP 协议通过 svn 存储库配置和管理用户和组。

然而,OpenLDAP 最近似乎经历了一些修改,并且有关 OpenLDAP 的 Ubuntu 官方文档已经过时了。

我发现一些论坛和博客提供了使用 OpenLDAP 的方法,但没有一个使用相同的配置算法,因此我不确定什么是适合实现的,什么是不适合实现的。希望看到一些包含有关此问题的可靠信息的回复。

After configuring apache2 and svn inside Ubuntu 10.04 serve I'm pretending to install OpenLDAP to use LDAP 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

热鲨 2024-09-25 06:21:47

我刚刚做了同样的事情。以下是我能找到的最佳链接:

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

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

我还发现这个脚本可以将 OpenLDAP 架构转换为 .ldif 格式(尽管我必须稍微调整脚本才能使其正常工作):

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

最后,我提供这两个 bash 脚本基于这些链接中的信息,并在我开发时帮助了我:)

#!/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

#!/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

希望这有帮助!

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!

心房敞 2024-09-25 06:21:47

还没有。您可以将 SVN 配置为通过 cyrus sasl 机制使用 LDAP 身份验证。不幸的是,这有一个问题,它无法工作(对于 svnserve 服务器)。 网络上有一些内容,但开发人员已经修复了sasl 的问题将与 SVN 1.7、IIRC 一起发布。

运行基于 Apache 的 SVN 非常简单。 为 mod_auth_ldap 添加一些 Auth* 条目,然后您就可以了完毕。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文