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

RE: ldapsearch returns dreaded 'no such object'

One beginner to another-

Try using ldapadd instead of slapadd - I had similar problem; slapadd
appeared to insert everything, ldapsearch reprted 'no such object'.  Got the
LDIF file loaded using ldapadd however.  Have no idea where slapadd put
those records..


-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Steve Johnson
Sent: Monday, July 29, 2002 11:28 AM
To: openldap-software@OpenLDAP.org
Subject: ldapsearch returns dreaded 'no such object'

fyi - i'm still completely stuck on this.  if anyone has any
suggestions i'd be most appreciative...



i'm attempting to migrate away from Netscape Directory Server and
onto OpenLDAP.  i believe i have successfully loaded in a cleaned up
LDIF file (using slapadd) but can't get ldapsearch to return any
records.  i'll paste below the relevant info below in the hopes that
i'm doing something stupid.

Platform: Redhat Linux (Linux 2.4.18 #3 SMP Fri Jul 26 16:27:29 MDT
2002 i686 unknown)
Version: OpenLDAP 2.0.23

example of failed search - i've tried MANY variations on this:
>  ldapsearch -v -x -b 'dc=aes,dc=org' 'cn=*' cn
ldap_initialize( <DEFAULT> )
filter: cn=*
requesting: cn
version: 2

# filter: cn=*
# requesting: cn

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

# numResponses: 1

example of what i think is a successful search:
>  ldapsearch -x -b '' -s base '(objectclass=*)' namingContexts
version: 2

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

namingContexts: dc=aes,dc=org

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

partial LDIF file:  (actual file actually has 542 uids and 19 groups)
dn: dc=aes,dc=org
objectClass: dcObject
objectClass: organization
o: AES
dc: aes

dn: ou=AES,dc=aes,dc=org
objectClass: top
objectClass: organizationalunit
ou: AES

dn: uid=sjohnson,ou=AES,dc=aes,dc=org
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
givenName: Steve
sn: Johnson
cn: Steve Johnson
uid: sjohnson
userpassword: {SHA}<snipped>

dn: cn=Test,ou=AES,dc=aes,dc=org
objectClass: top
objectClass: groupOfUniqueNames
cn: Test
uniqueMember: uid=sjohnson,ou=AES,dc=aes,dc=org

slapd.conf file with comments removed:
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 2001/09/27
20:00:31 kur
t Exp $

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
suffix          "dc=aes,dc=org"
rootdn          "cn=Manager,dc=aes,dc=org"
rootpw          secret
directory       /var/lib/ldap
index   objectClass,uid,uidNumber,gidNumber,memberUid   eq
index   cn,mail,surname,givenname                       eq,subinitial

ldap.conf file with comments removed:
# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v
2000/09/05 17:54:38 kurt Exp $

BASE dc=aes,dc=org

hopefully that's enough info but i can try to provide more...