On Thursday 02 November 2006 14:17, Antonio Broughton wrote:
I am running OpenLDAP 2.2.13 on a CentOS 4.1 box (I am using the CentOS
I have come across an issue, that I cannot seem to find the answer for
The problem is that an entry has some how been removed from LDAP well,
according to phpLDAPadmin and also ldapsearch.
mytestentry _used to be_ in LDAP... it has now "gone?"
I am using the following ldapsearch string..
ldapsearch -x -b "dc=tree,dc=internal,dc=company,dc=co,dc=nz"
# extended LDIF
# base <dc=tree,dc=internal,dc=company,dc=co,dc=nz> with scope sub
# filter: uid=mytestentry
# requesting: ALL
# search result
result: 0 Success
# numResponses: 1
However, if I try to add this entry to LDAP using ldapadd
ldapadd -x -D "cn=admin,dc=tree,dc=internal,dc=company,dc=co,dc=nz" -W
adding new entry
ldap_add: Already exists (68)
I have a few questions:
Looks like a corrupt index. I had that a couple times in the past.
1) Why would this entry be removed?
It's not removed, just missing from the index.
2) Why when I try and add the entry, it says that it exists?
Because it's still there in the DB.
3) Is there a way to fix it?
Reindex you DB. Stop slapd, remove all the indexes and run slapindex. Or
slapcat/slapadd you DB (that's what I used to do).
4) Am I doing something wrong?
You're using an outdated version, upgrade to 2.3.28 and if by chance you're
using ldbm as your backend, switch to bdb or hdb! Most of these cases I
remember I had with ldbm, I can't remember any case with bdb (but that
doesn't mean it can't happen with bdb).
He had that rare weird electricity about him -- that extremely wild and
heavy presence that you only see in a person who has abandoned all hope
of ever behaving "normally."
-- Hunter S. Thompson, "Fear and Loathing '72"