[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Deleting LDAP entries
You can also do a recursive delete of the top node of your LDAP
hierarchy -- e.g. use the ldapdelete command with the -r option (for
recursive). 'man ldapdelete' for more info.
An example:
ldapdelete -x -W -D "cn=Manager,dc=mydomain,dc=com" -r
"dc=mydomain,dc=com"
Matt
On Tue, 2003-05-27 at 07:36, pll+ldap@lanminds.com wrote:
> 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 :)
--
M Butcher <mbutcher@grcomputing.net>