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

ldapadd: invalid per syntax



I have followed the quickstart guide, but when I try to create the
initial entry in the database usin ldapadd, it croaks:

---8<---
$ ldapadd -v -x -D "cn=Manager,dc=telenor,dc=net" -W -f initial.ldif 
ldap_initialize( <DEFAULT> )
Enter LDAP Password: 
add objectclass:
	dcObject 
	organization 
add o:
	Nextra Norway
add dc:
	telenor
adding new entry "dc=telenor,dc=net"
ldap_add: Invalid syntax
	additional info: objectclass: value #0 invalid per syntax

ldif_record() = 21
$ 
---8<---

initial.ldif looks like this:

---8<---
dn: dc=telenor,dc=net
objectclass: dcObject 
objectclass: organization 
o: Nextra Norway
dc: telenor

dn: cn=Manager,dc=telenor,dc=net
objectclass: organizationalRole 
cn: Manager
---8<---

and this is my slapd.conf (comments removed):

---8<---
include     /usr/local/etc/openldap/schema/core.schema

pidfile     /usr/local/var/slapd.pid
argsfile    /usr/local/var/slapd.args

database    ldbm
suffix      "dc=telenor,dc=net"
rootdn      "cn=Manager,dc=telenor,dc=net"
rootpw      <planitext-password-removed>
directory   /usr/local/var/openldap-ldbm
index   objectClass eq
---8<---

I have been trying just about everything I can think of and looked
everywhere for an explaination, but at no avail. If I understand
ldapadd correctly, it reports an syntax-error in the very first
line of the ldif-input, the dn:-entry, but I am unable to see the
error.

I am using openldap 2.0.14 on a Debian Woody (unstable) system
running Linux 2.4.9. slapd is linked with the following:

---8<---
$ ldd /local/libexec/slapd 
	libdb3.so.3 => /usr/lib/libdb3.so.3 (0x4001d000)
	libcrypt.so.1 => /lib/libcrypt.so.1 (0x400c5000)
	libresolv.so.2 => /lib/libresolv.so.2 (0x400f2000)
	libdl.so.2 => /lib/libdl.so.2 (0x40103000)
	libpthread.so.0 => /lib/libpthread.so.0 (0x40107000)
	libc.so.6 => /lib/libc.so.6 (0x4011d000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
$ 
---8<---

and ldapadd is linked with:

---8<---
$ ldd /usr/local/bin/ldapadd 
	libcrypt.so.1 => /lib/libcrypt.so.1 (0x4001d000)
	libresolv.so.2 => /lib/libresolv.so.2 (0x4004a000)
	libdl.so.2 => /lib/libdl.so.2 (0x4005b000)
	libc.so.6 => /lib/libc.so.6 (0x4005f000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
$ 
---8<---

libdb3 is Berkeley DB v3.

If anyone could help, I would be most thankful!

-- 
Bjørn Nordbø  -  Network Development  -  Nextra Norway