我在我的 OpenLDAP 服务器中创建了一个组织 (o=otherorg,dc=example,dc=com),该服务器在 Debian stretch 上运行。现在我想删除它,但我尝试过的任何工具都不允许我这样做。下面是一大块 slapcat 输出,我想删除我尝试使用的“dn: o=otherorg,dc=example,dc=com”条目:
ldapdelete -x -W -D "cn=admin,dc=example,dc=com" "o=otherorg,dc=example,dc=com"
我创建了一个名为 delete.ldif 的文件,其中包含:
dn: o=otherorg,dc=example,dc=com
changetype: delete
并跑:
ldapmodify -Y EXTERNAL -H ldapi:/// -f /path/to/delete.ldiff
都没有成功
dn: dc=example,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: example.com
dc: example
structuralObjectClass: organization
entryUUID: 99585550-02ab-1038-9dc9-000000000000
creatorsName: cn=admin,dc=example,dc=com
createTimestamp: 19700101164420Z
entryCSN: 19700101164420.615825Z#000000#000#000000
modifiersName: cn=admin,dc=example,dc=com
modifyTimestamp: 19700101164420Z
contextCSN: 19700101173944.872394Z#000000#000#000000
contextCSN: 19700101173733.720551Z#000000#001#000000
dn: cn=admin,dc=example,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
structuralObjectClass: organizationalRole
creatorsName: cn=admin,dc=example,dc=com
userPassword:: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=
entryUUID: 995956ee-02ab-1038-9dca-000000000000
createTimestamp: 19700101164420Z
entryCSN: 19700101164420.622825Z#000000#000#000000
modifiersName: cn=admin,dc=example,dc=com
modifyTimestamp: 19700101164420Z
dn: o=otherorg,dc=example,dc=com
entryUUID: 7a6cd5be-02b3-1038-8346-000000000000
creatorsName: cn=admin,dc=example,dc=com
createTimestamp: 19700101173944Z
entryCSN: 19700101173944.872394Z#000000#000#000000
objectClass: top
objectClass: glue
structuralObjectClass: glue
modifiersName: cn=admin,dc=example,dc=com
modifyTimestamp: 19700101173944Z