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

slapadd, No such object (?)



Good day,

I've set up OpenLDAP, ran it, inserted some entries and set up Apache to
authenticate off of it.  So far, testing has gone well.

I've now dumped the database with slapcat and then reimported it with
slapadd (while having the server off).  Now, I can no longer work with the
database.  I get back "No such object", which I understand is usually
associated with not having the right baseDN.  But they do match; in fact I
have not even changed the slapd.conf nor the command to execute the query.

Furthermore, I can now not even add a single entry with ldapadd (even using
the same ldif file that I started out with, having a single entry), getting
the same error.  I have even tried to wipe /var/lib/ldap and start again
from scratch.  Still, the same error ("No such object").  As far as I can
tell, this SHOULD work, as again I have not changed the configuration file
since I've started, the database is empty, and I am running a command that
has worked fine in the past with this configuration.

I am sure that this is something simple, but, I can't find what it is. =/

I'm running Redhat 7.2 with openldap-2.0.11-13 .

Thanks to all who reply.

Here's some files/output:

==== slapd.conf:

include         /etc/openldap/schema/core.schema
include         /etc/openldap/schema/cosine.schema
include         /etc/openldap/schema/inetorgperson.schema
include         /etc/openldap/schema/nis.schema
include         /etc/openldap/schema/redhat/rfc822-MailMember.schema
include         /etc/openldap/schema/redhat/autofs.schema
include         /etc/openldap/schema/redhat/kerberosobject.schema
database        ldbm
schemacheck     on
suffix          "o=Shawtest,dc=shaw,dc=ca"
rootdn          "cn=Manager,o=Shawtest,dc=shaw,dc=ca"
rootpw                  d8bxl3
directory       /var/lib/ldap
index   objectClass,uid,uidNumber,gidNumber,memberUid   eq
index   cn,mail,surname,givenname                       eq,subinitial

=== Sample input ldif (shawtest1.ldif)

dn: uid=dgamble,ou=Users,o=Shawtest,dc=shaw,dc=ca
objectClass: inetOrgPerson
objectClass: person
objectClass: top
uid: dgamble
cn: Darren Gamble
sn: Gamble
ou: All Users
ou: Administrators


=== Sample command and output

$ ldapadd -h localhost -f shawtest1.ldif -x -D
"cn=Manager,o=Shawtest,dc=shaw,dc=ca" -w "d8bxl3"
adding new entry "uid=dgamble,ou=Users,o=Shawtest,dc=shaw,dc=ca"
ldap_add: No such object

ldif_record() = 32
$ 

=== Sample query (with or without database contents) and output

$ ldapsearch -h localhost -x -D "cn=Manager,o=Shawtest,dc=shaw,dc=ca" -w
"d8bxl3" -b "o=Shawtest,dc=shaw,dc=ca"
version: 2

#
# filter: (objectclass=*)
# requesting: ALL
#

# search result
search: 2
result: 32 No such object

# numResponses: 1
$ 




============================ 
Darren Gamble 
Planner, Regional Services 
Shaw Cablesystems GP 
630 - 3rd Avenue SW 
Calgary, Alberta, Canada 
T2P 4L4 
(403) 781-4948