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

Search fails after "re-adding" an entry


i am running openldap 2.2.23 with Berkeley DB 4.3.27. After adding an
entry, deleting this entry and again adding this entry a search with
the dn as searchbase and a filter "objectclass=*" returns nothing.

When searching with searchbase defined by suffix in slapd.conf and
another filter like mail=<address> the data for that entry are
returned as expected.

Here is my test scenario:

1. Add an entry

2. Search for that entry with: ldapsearch -x -h ldap-test -b"cn=Del
Test,ou=Administration,dc=internet-on,dc=tv" "objectclass=*" => works
as expected.

3. Delete entry

4. Search with command from 2. yields: "result: 32 No such object" =>
works as expected

5. Again adding the entry from 1.

6. ldapsearch as in 2. returns:
# search result
search: 2
result: 0 Success

# numResponses: 1

Obviously the searchbase is present, but the number of entries
returned is 0.

A search with a filter "mail=deltest@internet-on.test" and searchbase
"dc=internet-on,dc=tv" gives me the data that i added in 5.

After stopping and restarting slapd the search from 2. then works
again as expected, that means it returns an entry.

Test ldif data:

dn: cn=Del Test,ou=Administration,dc=internet-on,dc=tv
cn: Del Test
givenName: Del
sn: Test
o: Administration
l: Berlin
postalCode: 12345
street: NoRoad 66
telephoneNumber: +49 00190
mail: deltest@internet-on.test
objectClass: top
objectClass: inetOrgPerson

Has someone made a similar experience and has perhaps a solution for that issue?

Regards, Philipp