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

Re: Deleting Everything in LDAP



Michael Ströder wrote:
Joseph Kezar wrote:
 > I have a tree that I want to rebuild from scratch.

Are you looking for
1. a general solution working remote via LDAP or
2. a solution how to get rid of the data of an OpenLDAP directory tree?

1. won't work well for directories larger than a few dozens of entries.

For 2. simply delete the files in the directory holding this particular database.

 > ldapdelete -x -h localhost -D"cn=manager,o=mysite,c=US" -W objectclass=*
 >
 > But it doesnt take in a filter for the last clause,

Don't you need the brackets and quote the filter argument? Try

ldapdelete -x -h localhost -D"cn=manager,o=mysite,c=US" -W "(objectclass=*)"

locally: /etc/init.d/slapd stop rm /var/lib/ldap/* /etc/init.d/slapd start

I think this is the fastest method ;)

regards
Markus Schabel
+--------------------------------------------+
| TGM - Die Schule der Technik,   IT-Service |
|        A-1200 Wien, Wexstrasse 19-23       |
| Tel.: +43(1)33126/316 Fax: +43(1)33126/154 |
| eMail: markus.schabel@tgm.ac.at            |
|        markus.schabel@member.fsf.org       |
| FSF Associate Member #597                  |
| Linux User #259595 (http://counter.li.org) |
+--------------------------------------------+

Computers are like airconditioners:
  They stop working properly if you open windows.