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

ldapdelete and slapcat



I'm seeing inconsistancies in what slapcat shows is in the database and what
ldapsearch and ldapdelete say is in the database.

I'm about a week old to openldap, but I think this could be a problem.

I have openldap 2.0.6 running on a RH linux 6.2 box

I am using Berkeley DB 2.7.7. The make tests work correctly, and I used the
ldif file below to put some data in to the database with ldapadd.
My slapd.cof looks like

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.4 2000/08/26 17:06:18
kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include  /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema



# Define global ACLs to disable default read access.

# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org

pidfile  /usr/local/var/slapd.pid
argsfile /usr/local/var/slapd.args

# Load dynamic backend modules:
# modulepath /usr/local/libexec/openldap
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la

#######################################################################
# ldbm database definitions
#######################################################################
schemacheck off


database ldbm
suffix  "dc=my-domain, dc=com"
suffix "dc=xanboo, dc=com"
suffix o=xxxyyyzzz
rootdn "cn=Manager, o=xxxyyyzzz"
# Cleartext passwords, especially for the rootdn, should
# be avoid.  See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw  secret
# The database directory MUST exist prior to running slapd AND
# should only be accessable by the slapd/tools. Mode 700 recommended.
directory /usr/local/var/openldap-ldbm
# Indices to maintain
index objectClass eq

I used ldapadd to add data from this ldif

dn: dc=xanboo, dc=com
objectclass: top
objectclass: organization

dn: cn=Jack, dc=xanboo, dc=com
objectclass: top
objectclass: organization
objectclass: person
cn: Jack
sn: Chen

dn: cn=Babak, dc=xanboo, dc=com
objectclass: top
objectclass: organization
objectclass: person
cn: Babak
sn: Rezvani

dn: cn=Rob, dc=xanboo, dc=com
objectclass: top
objectclass: organization
objectclass: person
cn: rob
sn: King
email: "rob@corecam.com"

the adds were successful, and the slapcat program showed the new entries.

However, I accidently added the ldif file above a couple of more times
(before I realized that slapcat could show the contents)

I did several
ldapdelete -D "cn=Manager, o=xxxyyyzzz" -v -w secret -r "dc=xanboo, dc=com"

and they succeed, saying that they deleted the entries (I had to stop and
restart slapd between these deletes)

Now the ldapdelete command says that there are no more entries, however
slapcat looks like this.

dn: dc=xanboo, dc=com
objectClass: top
objectClass: organization

dn: cn=Jack, dc=xanboo, dc=com
objectClass: top
objectClass: organization
objectClass: person
cn: Jack
sn: Chen

dn: cn=Babak, dc=xanboo, dc=com
objectClass: top
objectClass: organization
objectClass: person
cn: Babak
sn: Rezvani

dn: dc=xanboo, dc=com
objectClass: top
objectClass: organization

dn: cn=Jack, dc=xanboo, dc=com
objectClass: top
objectClass: organization
objectClass: person
cn: Jack
sn: Chen

dn: cn=Babak, dc=xanboo, dc=com
objectClass: top
objectClass: organization
objectClass: person
cn: Babak
sn: Rezvani

dn: cn=Rob, dc=xanboo, dc=com
objectClass: top
objectClass: organization
objectClass: person
cn: rob
sn: King

dn: dc=xanboo, dc=com
objectClass: top
objectClass: organization

dn: cn=Jack, dc=xanboo, dc=com
objectClass: top
objectClass: organization
objectClass: person
cn: Jack
sn: Chen

dn: cn=Babak, dc=xanboo, dc=com
objectClass: top
objectClass: organization
objectClass: person
cn: Babak
sn: Rezvani

why are there several copies of the same records and why are they not going
away even though ldapdelete and ldapsearch both say that these records do
not exist

I used