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

Re: ldap_add: Invalid syntax

At 04:53 PM 10/23/00 +0800, Ronald Warner wrote:
>I have installed the following: openssl 0.9.5a, heimdal (kerberus),  
>cyrus sasl, berkeleydb 3.1.17 and openldap2.0.6.
>ldapadd -x -D "cn=Manager,dc=example,dc=com" -W -f  example.ldif
>Enter LDAP Password:
>adding new entry "dc=example, dc=com"
>ldap_add: Invalid syntax
>        additional info: value contains invalid data
>ldif_record() = 21
>here is example.ldif
>dn: dc=example, dc=com
>objectclass: dcObject
>objectclass: organization
>o: Example company
>dc: example
>dn: cn=Manager, dc=example, dc=com
>objectclass: organizationalRole
>cn: Manager
>here is my slapd.conf
>include         /usr/local/ldap/etc/openldap/schema/core.schema
>pidfile         /usr/local/ldap/var/slapd.pid
>argsfile        /usr/local/ldap/var/slapd.args
>database        ldbm
>suffix          "dc=example, dc=com"
>rootdn          "cn=Manager, dc=example, dc=com"
>rootpw          secret
>directory       /usr/local/ldap/var/openldap-ldbm
>index   objectClass     eq
>am I missing something?  thanks for the help.

Your configuration and initial LDIF look fine to me, however
syntax errors can be quite subtle (such as leading or trailing
whitespace).  Likely one of the values contains some garbage
which is not evident to the eye.  You might examining the LDIF
using a vi(1) "set list" or od(1) or similar tool.  Enabling
some server side logging might produce a hint as to exact problem.