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

Re: ldap_add: Invalid syntax



I think you need to do something like:

dn: dc=example, dc=com
objectclass: top
objectclass: dcObject
dc: example

dn: o=Example company,dc=example, dc=com
objectclass: top
objectclass: dcObject
objectclass: organization
dc: Example company

dn: cn=Manager, dc=example, dc=com
objectclass: organizationalRole
cn: Manager

dn: cn=Person1, o=Example company,dc=example, dc=com
objectclass: top
objectclass: person
objectclass: organizationalRole
cn: Person1

The main point is you can't use o: until it has been defined, hence the
invalid syntax.

It would be nice it if told you which line it did not like.

Goo luck

----- Original Message -----
From: "Ronald Warner" <cscrw@mail.dlsu.edu.ph>
To: <openldap-software@OpenLDAP.org>
Sent: Monday, October 23, 2000 9:53 AM
Subject: ldap_add: Invalid syntax


> 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.
>