PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Ldap kann base.ldif nicht einbinden



brauni
13.11.05, 15:56
server02:/etc/openldap # ldapadd -x -D "cn=admin,o=xeloxx,c=de" -W -f base.ldif
Enter LDAP Password: secret
adding new entry "o=xeloxx,c=de"
ldapadd: update failed: o=xeloxx,c=de
ldap_add: Invalid syntax (21)
additional info: objectClass: value #0 invalid per syntax


Hier meine conf Dateien:

/etc/openldap/ldap.conf:


# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v 1.9 2000/09/04 19:57:01 kurt Exp $
#
# LDAP Defaults
#

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

BASE dc=xeloxx, dc=de
URI ldap://192.168.3.20

#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never

/etc/openldap/slapd.conf


include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/misc.schema

loglevel 256

pidfile /var/run/slapd/slapd.pid
argsfile /var/run/slapd/slapd.args

schemacheck on

sizelimit 500
timelimit 3600


access to attr=userpassword
by self write
by anonymous auth

access to dn="cn=admin, o=xeloxx, c=de"
by none

access to *
by * read

################################################## #####################
# bdb database definitions
################################################## #####################

database bdb
checkpoint 1024 5
cachesize 10000

################################################## ####################

suffix "o=xeloxx,c=de"
rootdn "cn=admin,o=xeloxx,c=de"

rootpw secret

directory /var/lib/ldap

die base.ldif:


# LDAP Base
dn: o=xeloxx,c=de
objectClass: top
objectClass: organization
o: xeloxx

# Container für die Benutzer
dn: ou=users,o=xeloxx,c=de
ou: users
objectClass: top
objectClass: organizationalUnit

# Container für die NT-Maschinen
dn: ou=hosts,o=xeloxx,c=de
ou: hosts
objectClass: top
objectClass: organizationalUnit

# Container für die Gruppen
dn: ou=groups,o=xeloxx,c=de
ou: groups
objectClass: top
objectClass: organizationalUnit

# Admin des LDAP Verzeichnis
dn: cn=admin,o=xeloxx,c=de
objectClass: organizationalRole
cn: admin


Benutze SuSE 8.2 pro mit Openldap (RPM)

weis jemand um rat ?

[WCM]Manx
13.11.05, 18:02
Hi!

Prüf das base.ldif mal auf Leerzeichen (hinter top und den anderer objectClasses) usw. ein dos2unix base.ldif kann auch nicht schaden.

Versuch mal das Attachment bzw.


# LDAP Base
dn: o=xeloxx,c=de
objectClass: top
objectClass: organization
o: xeloxx

# Container für die Benutzer
dn: ou=users,o=xeloxx,c=de
ou: users
objectClass: top
objectClass: organizationalUnit

# Container für die NT-Maschinen
dn: ou=hosts,o=xeloxx,c=de
ou: hosts
objectClass: top
objectClass: organizationalUnit

# Container für die Gruppen
dn: ou=groups,o=xeloxx,c=de
ou: groups
objectClass: top
objectClass: organizationalUnit

# Admin des LDAP Verzeichnis
dn: cn=admin,o=xeloxx,c=de
objectClass: organizationalRole
cn: admin

Grüße

Manx

brauni
13.11.05, 21:51
Danke,

Hatte den Fehler gefunden:

Es waren Leerzeichen hinter allen Einträgen.
Jetzt läuft es.

gruss
...