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

Invalid DN Error



hello,
     I am trying to do a ldapsearch after adding a
entry, but it gives me Invalid DN error.
Could you help me please.
Is there anything wrong with the configuration?

thanxs
Lin

Here is details about what i tried

when i try ldapsearch just after starting slapd it
gives me the following output

$ ldapsearch -x -b '' -s base '(objectclass=*)'
namingCon
texts
version: 2

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

#
dn:
namingContexts: dc=ubm,dc=com,dc=edu

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

After this i add a entry  which gives me the following
output

$ ldapadd -x -D "cn=Manager,dc=ubm,dc=com,dc=edu" -W
-f example.ldif
Enter LDAP Password:
adding new entry "dc=ubm, dc=com, dc=edu"
ldap_add: Referral

ldif_record() = 10
$

and if i perform a ldapsearch operation after this it
result in giving a invalid DN

$ ldapsearch -x -b -LLL 'dc=ubm, dc=com, dc=edu'
'(objectclass=*)'
version: 2

#
# filter: dc=ubm, dc=com, dc=edu
# requesting: (objectclass=*)
#

# search result
search: 2
result: 34 Invalid DN syntax
text: invalid DN

# numResponses: 1
$



My slapd.conf file looks this way:-

# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v
1.8.8.4 2000/08/26 17:06:18 kur
t Exp $
#
# See slapd.conf(5) for details on configuration
options.
# This file should NOT be world readable.
# 
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



# 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        /var/run/slapd.pid
#argsfile       /var/run/slapd.args
# Load dynamic backend modules:
# modulepath    /usr/sbin/openldap
# moduleload    back_ldap.la
# moduleload    back_ldbm.la
# moduleload    back_passwd.la
# moduleload    back_shell.la

# To allow TLS-enabled connections, create
/usr/share/ssl/certs/slapd.pem
# and uncomment the following lines.
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem

#######################################################################
# ldbm database definitions
#######################################################################

database        ldbm
suffix          "dc=ubm, dc=com, dc=edu"
rootdn          "cn=Manager, dc=ubm, dc=com, dc=edu"
# Cleartext passwords, especially for the rootdn,
should
# be avoided.  See slappasswd(8) and slapd.conf(5) for
details.
# Use of strong authentication encouraged.
rootpw                   secret
# rootpw                {crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running
slapd AND
# should only be accessable by the slapd/tools. Mode
700 recommended.
directory       /var/lib/ldap
# Indices to maintain
#index  objectClass                             eq
index   cn,sn,uid                               eq
index   objectClass                            
pres,eq                                

                                                      

My example.ldif file looks this way:-

dn: dc=ubm, dc=com, dc=edu
objectclass: dcObject
objectclass: organisation
dc=ubm
dn: cn=Manager, dc=ubm, dc=com, dc=edu
objectclass: organizationalRole
cn: Manager 



__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/