OpenLDAP 没有此对象 (32)

OpenLDAP 没有此对象 (32)

我正在尝试设置一个以 FusionDirectory 为前端的 OpenLDAP 服务器

遵循本指南: http://documentation.fusiondirectory.org/en/documentation/admin_installation_redhat_6

http://documentation.fusiondirectory.org/openldap_install_rhel6

我的 ch_domainSettings.ldif 中有以下内容

dn: olcDatabase={1}monitor,cn=config
changetype: modify
replace: olcAccess
olcAccess: {0}to * by   dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth"
  read by dn.base="cn=Manager,dc=example,dc=net" read by * none

dn: olcDatabase={2}bdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=example,dc=net

dn: olcDatabase={2}bdb,cn=config
changetype: modify
replace: olcRootDN
olcRootDN: cn=Manager,dc=example,dc=net

dn: olcDatabase={2}bdb,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {SSHA}RbncgBcs8McqwMMAjx4CFdENpLycUc4w

dn: olcDatabase={2}bdb,cn=config
changetype: modify
add: olcAccess
olcAccess: {0}to attrs=userPassword,shadowLastChange by
  dn="cn=Manager,dc=example,dc=net" write by anonymous auth by self write by * none
olcAccess: {1}to dn.base="" by * read
olcAccess: {2}to * by dn="cn=Manager,dc=example,dc=net" write   by * read

并且运行时

Sudo ldapadd -Y EXTERNAL -H ldapi:/// -f ch_domainSettings.ldif 

我收到以下错误:

SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry "olcDatabase={1}monitor,cn=config"

modifying entry "olcDatabase={2}bdb,cn=config"
ldap_modify: No such object (32)
        matched DN: cn=config

您能指出可能存在什么问题吗?

答案1

您需要找出您配置了哪些后端数据库:

ldapsearch -H ldapi:/// -Y EXTERNAL -b "cn=config" -LLL -Q "olcDatabase=*" dn

您正在寻找的可能是 BDB、HDB 或 MDB。

(编辑:再加一个/)

答案2

也许您配置的第二个数据库不是 类型bdb。例如,CentOS 7hdb默认使用 。

dn: olcDatabase={2}hdb,cn=config

相关内容