ldap_modify: Kein solches Objekt (32)

2005
HP.

Ich habe OpenLDAP auf Centos 7 installiert und versucht, den Administratorbenutzer zu erstellen. Aber ich habe einen Fehler bekommen ldap_modify. Unten sind meine Schritte:

Installiere OpenLDAP und starte es:

sudo yum install openldap openldap-servers openldap-clients -y systemctl start slapd.service 

Erstellen admin.ldif

dn: olcDatabase=config,cn=config changetype: modify add: olcRootPW olcRootPW: CRiUMh5UM8/chPHbfc2Se2JA8Quc5F1P  dn: olcDatabase=monitor,cn=config changetype: modify replace: olcAccess olcAccess: to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by dn.base="cn=ldapadmin,dc=demo,dc=local" read by * none  dn: olcDatabase=bdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc=demo,dc=local  dn: olcDatabase=bdb,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=ldapadmin,dc=demo,dc=local  dn: olcDatabase=bdb,cn=config changetype: modify add: olcRootPW olcRootPW: CRiUMh5UM8/chPHbfc2Se2JA8Quc5F1P  dn: olcDatabase=bdb,cn=config changetype: modify add: olcAccess olcAccess: to attrs=userPassword,shadowLastChange by dn="cn=ldapadmin,dc=demo,dc=local" write by anonymous auth by self write by * none olcAccess: to dn.base="" by * read olcAccess: to * by dn="cn=ldapadmin,dc=demo,dc=local" write by * read 

Führen Sie unter der Befehlszeile aus:

ldapmodify -Y EXTERNAL -H ldapi:/// -f /root/demo/users/admin.ldif 

Dann bekam ich diesen Fehler :

SASL/EXTERNAL authentication started SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth SASL SSF: 0 modifying entry "olcDatabase=bdb,cn=config" ldap_modify: No such object (32) matched DN: cn=config 

Ich habe diesen Fehler nicht in einem anderen System mit Centos 7 gehabt, daher frage ich mich, was hier passiert.

Bitte helfen

0

1 Antwort auf die Frage

1
HP.

Ich habe das Problem gefunden. Hier ist der Fix:

Wechseln Sie olcDatabase=bdbzuolcDatabase=hdb

Stellen Sie sicher, dass Sie diese vorher ausführen:

ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif  ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif 

Referenz: https://www.itzgeek.com/how-tos/linux/centos-how-tos/step-step-openldap-server-configuration-centos-7-rhel-7.html