Problem:
I'm trying to delete an entry in a ldap directory. The entry exists but for some bad reasons the schema of the class of the entry doesn't exist anymore.
The entry I want to delete is the one with dn: userr=lucio,dc=labammsis
:
$ ldapsearch -LLL -x -h 10.1.1.254 -b "dc=labammsis" -s sub
dn: dc=labammsis
objectClass: top
objectClass: dcObject
objectClass: organization
o: labammsis
dc: labammsis
dn: cn=admin,dc=labammsis
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
dn: userr=lucio,dc=labammsis
objectClass: data
limit: 200
When I try to do the ldapdelete
, I face an Invalid DN syntax error:
$ ldapdelete -x -D "cn=admin,dc=labammsis" -w "[mypassword]" -h 10.1.1.254 "userr=lucio,dc=labammsis"
ldap_delete: Invalid DN syntax (34)
additional info: invalid DN
Do I face this error because the schema doesn't exist anymore? If yes, what could I do? If no, what's the problem then?
Personal researches:
Both on ServerFault and on the web there are plenty of people like me that face this error. Anyway, even if I read a lot of Q&A about this, they always seem to be on ldapadd
or ldapmodify
.
I found this post about ldapdelete
, but the problem is about the order of the options in the command syntax.