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

Re: ldapdelete struggle

LÉVAI Dániel wrote:

$ ldapdelete -ZZWx -vf ldap_delete.ldif
ldap_initialize( <DEFAULT> )
Enter LDAP Password:
deleting entry "dn:: Y249w5x6ZW1lbHRldMO1IEJyaWfDoWQsY249ZGFuaWVsbCxjbj1hZGRyZXNzYm9va3MsZGM9ZWNlbnRydW0sZGM9aHU="
ldap_delete: Invalid DN syntax (34)
additional info: invalid DN

I think I'm missing something? What could be wrong?

According to the ldapdelete(1) man page, ldapdelete takes the DN to be deleted as an argument. So you cannot put a "dn:" prefix, and thus not even a "dn::" prefix. You need to use ldapmodify(1), which takes LDIF as input (RFC 2849). In that case, your file needs to contain

dn:: Y249w5x6ZW1lbHRldMO1IEJyaWfDoWQsY249ZGFuaWV
changetype: delete


Ing. Pierangelo Masarati OpenLDAP Core Team

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