[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldapdelete struggle



LÉVAI Dániel wrote:
Hi!

I'm having this problem with deleting an entry from my ldap database.
Here is what I'm doing:
# search for the entry
$ ldapsearch -ZZWx '(mail=*uzem*)'
Enter LDAP Password:
[...]
dn::
Y249w5x6ZW1lbHRldMO1IEJyaWfDoWQsY249ZGFuaWVsbCxjbj1hZGRyZXNzYm9va3MsZGM9Z
 WNlbnRydW0sZGM9aHU=
[...]
# numResponses: 2
# numEntries: 1

# got the dn, it is encoded in base64, so I'm trying to delete it:
$ cat ldap_delete.ldif
dn::
Y249w5x6ZW1lbHRldMO1IEJyaWfDoWQsY249ZGFuaWVsbCxjbj1hZGRyZXNzYm9va3MsZGM9Z
# ^^ that is one line in the file
$ ldapdelete -ZZWx -vf ldap_delete.ldif
ldap_initialize( <DEFAULT> )
Enter LDAP Password:
deleting entry "dn::
Y249w5x6ZW1lbHRldMO1IEJyaWfDoWQsY249ZGFuaWVsbCxjbj1hZGRyZXNzYm9va3MsZGM9Z"
ldap_delete: Invalid DN syntax (34)
        additional info: invalid DN

I've tried it without the dn:: prefix too, but it didn't work.

Could someone help me with this?

You're missing the trailing "WNlbnRydW0sZGM9aHU=" portion of your DN. Glue together the two halves and retry.


p.


Ing. Pierangelo Masarati OpenLDAP Core Team

SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
-----------------------------------
Office:  +39 02 23998309
Mobile:  +39 333 4963172
Fax:     +39 0382 476497
Email:   ando@sys-net.it
-----------------------------------