配置 – 将OpenLDAP从cn = config切换到slapd.conf

在Debian 6(或ubuntu 12.04)上的新的OpenLDAP安装中,我想从现代的cn = config配置样式切换到传统的slapd.conf配置.我听说这是可能的,但到目前为止我还没有找到描述,操作方法或教程.

我怎么能这样做,或者我在哪里可以看到?

好的,发现自己.请注意我在全新安装时这样做,所以没有数据损坏.如果您在生产系统上执行此操作,请确保您可以回滚:)

所以,在debian 6上你可以这样做:

service slapd stop # stop the service
mv /etc/ldap/slapd.d /root # move the cn=config configuration
cp /usr/share/slapd/slapd.conf /etc/ldap/ # get new sample config
# make changes to sample config so that it can work
sed -i "s/@BACKEND@/hdb/" /etc/ldap/slapd.conf
sed -i "s/@SUFFIX@/dc=acme,dc=org/" /etc/ldap/slapd.conf
sed -i "s/# rootdn/rootdn/" /etc/ldap/slapd.conf
# manually execute "slappasswd" on the command line to generate a root pw
# then add the following line (without "#") after rootdn
# rootpw <crypted password>
sed -i "s/@ADMIN@/cn=admin,dc=acme,dc=org/" /etc/ldap/slapd.conf
mv /var/lib/ldap/* /root # remove old config database
service slapd start # start service again

进一步的配置可能是nessassary,但这为您提供了一个可以通过传统的slapd.conf配置的系统

相关文章

用的openwrt路由器,家里宽带申请了动态公网ip,为了方便把2...
#!/bin/bashcommand1&command2&wait从Shell脚本并行...
1.先查出MAMP下面集成的PHP版本cd/Applications/MAMP/bin/ph...
1、先输入locale-a,查看一下现在已安装的语言2、若不存在如...
BashPerlTclsyntaxdiff1.进制数表示Languagebinaryoctalhexa...
正常安装了k8s后,使用kubect工具后接的命令不能直接tab补全...