Hello,
I'm trying to delete an entry in my ldap database. But when issuing this command I am getting an error:
[root@ldap01:~/ldap] #ldapdelete -v -x 'dn: uid=spencer,ou=People,dc=example,dc=com' -D cn=admin,dc=example,dc=com -W
ldap_initialize( <DEFAULT> )
Enter LDAP Password:
deleting entry "dn: uid=spencer,ou=People,dc=example,dc=com"
ldap_delete: Invalid DN syntax (34)
additional info: invalid DN
I find it strange to be getting an 'invalid dn' error as the dn I'm using in the delete command was pulled straight form an ldapsearch:
root@ldap01:~/ldap] #ldapsearch -x -LLL -b dc=example,dc=com 'uid=spencer' dn
dn: uid=spencer,ou=People,dc=example,dc=com
It was a straight copy paste, so I am unsure of why I might be getting this error. Could I please get some help on the syntax I'll need to get the command to work properly?
Thank you,
Tim
Hi
I'm trying to delete an entry in my ldap database. But when issuing this command I am getting an error:
[root@ldap01:~/ldap] #ldapdelete -v -x 'dn: uid=spencer,ou=People,dc=example,dc=com' -D cn=admin,dc=example,dc=com -W ldap_initialize( <DEFAULT> ) Enter LDAP Password: deleting entry "dn: uid=spencer,ou=People,dc=example,dc=com" ldap_delete: Invalid DN syntax (34) additional info: invalid DN
The 'dn: ' bit is not part of the DN, try
ldapdelete -v -x -W uid=spencer,ou=People,dc=example,dc=com
Chris
Hey, thanks!
Well I had to add my admin login to get it to work, but the info you gave me got it solved!
[root@ldap01:~/ldap] #ldapdelete -v -x 'uid=spencer,ou=People,dc=jokefire,dc=com' -D cn=admin,dc=jokefire,dc=com -W ldap_initialize( <DEFAULT> ) Enter LDAP Password: deleting entry "uid=spencer,ou=People,dc=jokefire,dc=com"
SUCCESS!!! Really appreciate the help!
Tim
On Sat, Mar 8, 2014 at 2:56 PM, Chris Card ctcard@hotmail.com wrote:
Hi
I'm trying to delete an entry in my ldap database. But when issuing this
command I am getting an error:
[root@ldap01:~/ldap] #ldapdelete -v -x 'dn:
uid=spencer,ou=People,dc=example,dc=com' -D cn=admin,dc=example,dc=com -W
ldap_initialize( <DEFAULT> ) Enter LDAP Password: deleting entry "dn: uid=spencer,ou=People,dc=example,dc=com" ldap_delete: Invalid DN syntax (34) additional info: invalid DN
The 'dn: ' bit is not part of the DN, try
ldapdelete -v -x -W uid=spencer,ou=People,dc=example,dc=com
Chris
openldap-technical@openldap.org