DaQuark
23.02.04, 14:17
Hallo liebe Gemeinschaft,
habe schon gegoogelt und hier einige Post's zu LDAP gefunden - habe auch alles ausprobiert, hat bis jetzt aber nix geholfen.
mein Problem :
Ich möchte ein LDAP Server aufsetzen. Nun möchte ich eine Datenbank zum LDAP Server hinzufügen.
Dies tue ich mit dem Befehl :
ldapadd -D "cn=admin,dc=structure-net.de" < /etc/openldap/ldif/firmenstruktur.ldif -x -W
ich habe auch schon probiert :
ldapadd -h localhost -D "cn=admin,dc=structure-net.de" < /etc/openldap/ldif/firmenstruktur.ldif -x -W
Danach werde ich aufgefordert, dass Passwort einzugeben. Wenn ich es eingeben kommt folgende Fehlermeldung :
ldap_bind: Invalid credentials
wenn ich kein PW eingebe kommt folgendes :
adding new entry "dc=structure-net, dc=de "
ldap_add: Invalid syntax
additional info: objectclass: value #0 invalid per syntax
ldif_record() = 21
Was mache ich falsch ? Ich poste hier mal meine Conf-Datei und die Datenbank, die ich einfügen will :
ldap.conf
=======
# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v 1.4.8.6 2000/09/05 17:54:38 kurt Exp $
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
#BASE dc=example, dc=com
URI ldap://localhost:389";
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
#HOST ldap.structure-net.de
#HOST 127.0.0.1
BASE dc=structure-net.de,dc=de
sldap.conf
========
# 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
#include /etc/openldap/slapd.at.conf
include /etc/openldap/slapd.oc.conf
schemacheck off
# 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
# Create a replication log in /var/lib/ldap for use by slurpd.
#replogfile /var/lib/ldap/master-slapd.replog
# Load dynamic backend modules:
# modulepath /usr/sbin/openldap
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la
#
# The next three lines allow use of TLS for connections using a dummy test
# certificate, but you should generate a proper certificate by changing to
# /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on
# slapd.pem so that the ldap user or group can read it.
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem
# TLSCACertificateFile /usr/share/ssl/certs/ca-bundle.crt
#
# Sample Access Control
# Allow read access of root DSE
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
#
#access to dn="" by * read
#access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default is:
# Allow read by all
#
# rootdn can always write!
################################################## #####################
# ldbm database definitions
################################################## #####################
database ldbm
suffix "dc=structure-net,dc=de"
#suffix "o=Synemedia Technologie ,dc=DE"
rootdn "cn=admin,dc=structure-net,dc=de"
#rootdn "uid=admin,o=Synemedia Technologie,dc=DE"
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw marcel
#rootpw {crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory /var/lib/ldap
# Indices to maintain
Hier noch meine Datenbank, die ich einfügen will
==================================
dn: uid=csy,ou=Geschaeftsfuehrung,dc=structure-net,dc=de
objectclass: person
dn: dc=structure-net, dc=de
objectclass: organization
objectclass: top
o:Synemedia Technologie
l: Berlin
postcode: 10715
streetadress: Hildegardstr. 28
dn: ou=Geschaeftsfuehrung, dc=structure-net, dc=de
objectclass: organizationalunit
ou: Geschaeftsfuehrung
description: Chef
telephonenumber: 00 49 30 862 00 00
facsmiletelephonenumber: 00 49 30 862 00 00
dn: ou=Entwicklung, dn=structure-net, dc=de
objectclass: organizationalunit
ou: Entwicklung
description: JAVA Entwicklung
telephonenumber: 00 49 30 862 00 00
facsmiletelephonenumber: 00 49 30 862 00 00
dn: ou=Netzwerk, dn=structure-net, dc=de
objectclass: organizationalunit
ou: Netzwerk
description: Administration des Netzwerkes
Danke für Eure Hilfe im Vorraus.
THX Marcel
habe schon gegoogelt und hier einige Post's zu LDAP gefunden - habe auch alles ausprobiert, hat bis jetzt aber nix geholfen.
mein Problem :
Ich möchte ein LDAP Server aufsetzen. Nun möchte ich eine Datenbank zum LDAP Server hinzufügen.
Dies tue ich mit dem Befehl :
ldapadd -D "cn=admin,dc=structure-net.de" < /etc/openldap/ldif/firmenstruktur.ldif -x -W
ich habe auch schon probiert :
ldapadd -h localhost -D "cn=admin,dc=structure-net.de" < /etc/openldap/ldif/firmenstruktur.ldif -x -W
Danach werde ich aufgefordert, dass Passwort einzugeben. Wenn ich es eingeben kommt folgende Fehlermeldung :
ldap_bind: Invalid credentials
wenn ich kein PW eingebe kommt folgendes :
adding new entry "dc=structure-net, dc=de "
ldap_add: Invalid syntax
additional info: objectclass: value #0 invalid per syntax
ldif_record() = 21
Was mache ich falsch ? Ich poste hier mal meine Conf-Datei und die Datenbank, die ich einfügen will :
ldap.conf
=======
# $OpenLDAP: pkg/ldap/libraries/libldap/ldap.conf,v 1.4.8.6 2000/09/05 17:54:38 kurt Exp $
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
#BASE dc=example, dc=com
URI ldap://localhost:389";
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
#HOST ldap.structure-net.de
#HOST 127.0.0.1
BASE dc=structure-net.de,dc=de
sldap.conf
========
# 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
#include /etc/openldap/slapd.at.conf
include /etc/openldap/slapd.oc.conf
schemacheck off
# 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
# Create a replication log in /var/lib/ldap for use by slurpd.
#replogfile /var/lib/ldap/master-slapd.replog
# Load dynamic backend modules:
# modulepath /usr/sbin/openldap
# moduleload back_ldap.la
# moduleload back_ldbm.la
# moduleload back_passwd.la
# moduleload back_shell.la
#
# The next three lines allow use of TLS for connections using a dummy test
# certificate, but you should generate a proper certificate by changing to
# /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on
# slapd.pem so that the ldap user or group can read it.
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem
# TLSCACertificateFile /usr/share/ssl/certs/ca-bundle.crt
#
# Sample Access Control
# Allow read access of root DSE
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
#
#access to dn="" by * read
#access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default is:
# Allow read by all
#
# rootdn can always write!
################################################## #####################
# ldbm database definitions
################################################## #####################
database ldbm
suffix "dc=structure-net,dc=de"
#suffix "o=Synemedia Technologie ,dc=DE"
rootdn "cn=admin,dc=structure-net,dc=de"
#rootdn "uid=admin,o=Synemedia Technologie,dc=DE"
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw marcel
#rootpw {crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory /var/lib/ldap
# Indices to maintain
Hier noch meine Datenbank, die ich einfügen will
==================================
dn: uid=csy,ou=Geschaeftsfuehrung,dc=structure-net,dc=de
objectclass: person
dn: dc=structure-net, dc=de
objectclass: organization
objectclass: top
o:Synemedia Technologie
l: Berlin
postcode: 10715
streetadress: Hildegardstr. 28
dn: ou=Geschaeftsfuehrung, dc=structure-net, dc=de
objectclass: organizationalunit
ou: Geschaeftsfuehrung
description: Chef
telephonenumber: 00 49 30 862 00 00
facsmiletelephonenumber: 00 49 30 862 00 00
dn: ou=Entwicklung, dn=structure-net, dc=de
objectclass: organizationalunit
ou: Entwicklung
description: JAVA Entwicklung
telephonenumber: 00 49 30 862 00 00
facsmiletelephonenumber: 00 49 30 862 00 00
dn: ou=Netzwerk, dn=structure-net, dc=de
objectclass: organizationalunit
ou: Netzwerk
description: Administration des Netzwerkes
Danke für Eure Hilfe im Vorraus.
THX Marcel