根据 ldapdelete 的手册页,应该可以删除条目
[root@controller ~]# man ldapdelete
EXAMPLE
The following command:
ldapdelete "cn=Delete Me,dc=example,dc=com"
will attempt to delete the entry named "cn=Delete Me,dc=exam‐
ple,dc=com". Of course it would probably be necessary to supply
authentication credentials.
但删除域名不起作用:
[root@controller ~]# ldapdelete -x -D "cn=Manager,dc=my-domain,dc=com" -W "dc=my-domain,dc=com"
Enter LDAP Password:
ldap_delete: No such object (32)
只要它存在
[root@controller ~]# ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
# extended LDIF
#
# LDAPv3
# base <> with scope baseObject
# filter: (objectclass=*)
# requesting: namingContexts
#
#
dn:
namingContexts: dc=my-domain,dc=com
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
答案1
即使删除基本条目也不会删除命名上下文。您必须将其从配置中删除。