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

Re: How to delete all entries in LDAP (fwd)



SUNIL VEREKAR:
> 
> Can anyone tell me how to delete all entries in LDAP , i tried the 
> below command as root .
>   ldapdelete  -H ldap://email "dc=phil,dc=com,dc=sg"  -x "(cn=*)"
> 
> where email is the hostname where ldap is installed ..
> 
> it gave me me the below error 
> Delete Result: Operation not allowed on nonleaf (66)
> Additional info: subtree delete not supported
> Delete Result: Invalid DN syntax (34)
> Additional info: invalid DN

1. Check wether your version of ldap-server and client support recursive
   delete. Seems to me yours doesn't ?

2. Why not do this instead:
   2.1 stop the slapd-server
   2.2 $ rm $path-to-dir-of-ldap-database/*
       where $path-to-dir-of-ldap-database default is /var/lib/ldap-ldbm
       or something similar.
   2.3 initialize your ldap-server using e.g. slapadd
   2.4 start the slapd-server

Don't know if this is what you were looking for but it's quick.

-- 
Best regards

Bjørn Ove Grøtan

"SELECT 2 + 2, pi(), 'PostgreSQL is more than a calculator!';"