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

Re: Deleting LDAP entries



In a message dated: Mon, 26 May 2003 15:55:37 EDT
V Alex Brennen said:

>On Mon, 26 May 2003, Shahin wrote:
>
>> Hi list,
>> how can I delete all entries in LDAP ???
>
>The easiest way to do this with OpenLDAP is to simply remove
>the databases in which the entries are stored.  Essentially,
>to start over from scratch as far as your dbs.  If there is 
>anything you want to keep, you can export it to LDIF and 
>reload it after the dbs have been recreated.

Or, if for some reason, you don't want to do that, you can do 
something like:

	ldapsearch -x '(cn=*)' dn | grep ^dn | sed 's/dn: //' | ldapdelete -x

Or some variation on that theme with the appropriate options thrown in
for your config.  Of course, just deleting the dbs is a lot easier :)
-- 

Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853  E808 BB07 9239 53F1 28EE

	It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.

	 If you're not having fun, you're not doing it right!