我被要求在Ubuntu 11.04上设置一个多主LDAP环境 – 而不是一个主服务器。 我克隆了主服务器,并将其重新创build到两个虚拟机中。 我正在尝试按照这里的OpenLDAP文档的说明:
http://www.openldap.org/doc/admin24/replication.html
它讨论了如何修改LDAP中的cn = config树。 子目录树似乎在:
/etc/ldap/slapd.d/
和a
slapcat -b cn=config
丢弃一个configuration信息的负载。 当我尝试使用浏览器和pipe理绑定凭据进行连接时:
ldapsearch -D '<adminDN>' -w <password> -b 'cn=config'
我得到:
# extended LDIF # # LDAPv3 # base <> (default) with scope subtree # filter: (objectclass=*) # requesting: ALL # # search result search: 2 result: 32 No such object
当我通过LDAP浏览器连接时,我没有看到configuration上下文。 我确定我错过了一些东西,但我看不到它是什么!
我相信你正在使用错误的pipe理员凭据。
而默认情况下,某些Ubuntu被设置为使用超过SASL / EXTERNAL Unix Sockets的root身份。
# {0}config, config dn: olcDatabase={0}config,cn=config olcRootDN: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth`
尝试使用sudo ldapsearch -H ldapi:/// -Y external -b cn=config
如果你有一个旧的slapd.conf,或者从/ usr / share / doc复制一个。 如果你有你的slapd.conf,你可以删除slapd.d / *数据并从你的slapd.conf创build一个新的slapd.dconfiguration
slapadd -f slapd.conf -F slapd.d -n0
一定要用你的configuration来testing你的configuration
slaptest -f slapd.conf
并确保拥有slapd.d中的所有内容给openldap或任何特殊的ldap用户。 OpenLDAP在默认安装中不提供任何slapd.conf文件。 你可以用ldapmodify在“live”模式下做所有的事情,但是为了提供第一次configuration,你应该使用slapd.conf并将其转换。
干杯,