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

Re: Deleting hundreds of Entry under a OU

Rein Tollevik schrieb:
Michael Ströder wrote:
Daniel Spannbauer wrote:

I have to deleted abount 500 Entrys under a OU in my LDAP-Tree cause I
have to change the objectClass from "account" to "inetorgPerson".
Can I do this with ldapdelete? I always used that tool only to delete
one entry.

Yes. But you have to provide a file with a list of the DNs of the
entries to be deleted.

$ ldapdelete -h
usage: ldapdelete [options] [dn]...
    dn: list of DNs to delete. If not given, it will be readed from stdin
        or from the file specified with "-f file".

Or you could try to simply change the objectclass and all required attribute values in one operation using ldapmodify with the "-e relax" control. It should allow you to replace the structural objectclass, which otherwise is forbidden.

Hmm, my ldapmodify don't know this switch.

How can I delete all entrys under an OU?
If this works I delete all entrys and add them with the right ObjectClass.




Daniel Spannbauer                         Software Entwicklung
marco Systemanalyse und Entwicklung GmbH  Tel   +49 8333 9233-27 Fax -11
Rechbergstr. 4 - 6, D 87727 Babenhausen   Mobil +49 171 4033220
http://www.marco.de/                      Email ds@marco.de
Geschäftsführer Martin Reuter             HRB 171775 Amtsgericht München