Bonjour,
Plutot début dans le domaine je souhaite mettre sur pied un server LDAP.
J’ai créé un fichier LDIF (LDIF_init.ldif), et lorsque je veux l’intégrer à LDAP via la commande :
ldapadd -x -D ‘cn=Admin,o=tg’ -W -f /etc/openldap/LDIF_init.ldif
J’ai l’erreur suivante :
adding new entry "o=tg"
ldap_add: Invalid syntax (21)
additional info: objectclass: value #0 invalid per syntax
J’ai : Mandriva Linux release 2009.1 (Official) for i586
et : OpenLDAP 2.4.16
J’ai déjà cherché dans des doc/forum hier toute la journée mais je n’arrive pas à trouver mon erreur.
Voici mon fichier LDIF_init.ldif
dn: o=tg
objectclass: organization
o: tg Edit the LDIF file according to the DIT.
dn:ou=people,o=tg
objectclass:organizationalUnit
ou:people
description:People's branch
dn:ou=UnixAccounts,ou=people,o=tg
objectclass:organizationalUnit
ou:UnixAccounts
description:Unix Accounts
dn:ou=FtpAccounts,ou=people,o=tg
objectclass:organizationalUnit
ou:FtpAccounts
description:pureftpd accounts
dn:ou=Hosts,o=tg
objectclass:organizationalUnit
ou:Hosts
description:The computers
Mon fichier slapd.conf
# $OpenLDAP: pkg/ldap/servers/slapd/slapd.conf,v 1.8.8.6 2001/04/20 23:32:43 kurt Exp $
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
#
include /usr/share/openldap/schema/core.schema
include /usr/share/openldap/schema/cosine.schema
include /usr/share/openldap/schema/corba.schema
include /usr/share/openldap/schema/inetorgperson.schema
include /usr/share/openldap/schema/java.schema
include /usr/share/openldap/schema/krb5-kdc.schema
include /usr/share/openldap/schema/kerberosobject.schema
include /usr/share/openldap/schema/openldap.schema
include /usr/share/openldap/schema/autofs.schema
include /usr/share/openldap/schema/samba.schema
include /etc/openldap/schema/local.schema
pidfile /var/run/ldap/slapd.pid
argsfile /var/run/ldap/slapd.args
modulepath /usr/lib/openldap
# To allow TLS-enabled connections, create /etc/ssl/openldap/ldap.pem
# and uncomment the following lines.
#TLSRandFile /dev/random
#TLSCipherSuite HIGH:MEDIUM:+SSLv2
TLSCertificateFile /etc/ssl/openldap/ldap.pem
TLSCertificateKeyFile /etc/ssl/openldap/ldap.pem
#TLSCACertificatePath /etc/ssl/openldap/
#TLSCACertificateFile /etc/ssl/cacert.pem
TLSCACertificateFile /etc/ssl/openldap/ldap.pem
#TLSVerifyClient never # ([never]|allow|try|demand)
#######################################################################
# database definitions
#######################################################################
database bdb
suffix "o=tg"
rootdn "cn=admin,o=tg"
rootpw {SSHA}dIlg1am4K2cvQTiKpuR6gzuVEaEf/7UZ
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw secret
# rootpw {crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running slapd AND
# should only be accessable by the slapd/tools. Mode 700 recommended.
directory /var/lib/ldap
access to attr=userPassword
by self write
by anonymous auth
by dn="cn=admin,o=tg" write
by * none
access to *
by self write
by dn="cn=admin,o=tg" write
by * read
Et mon fichier 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 "o=tg"
HOST 127.0.0.1
URI [127.0.0.1...](ldap://127.0.0.1)
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
# SSL/TSL configuration. With CA-signed certs, TLS_REQCERT should be
# "demand", with the CA certificate accessible
#TLS_CACERT /etc/ssl/cacert.pem
#TLS_CACERTDIR /etc/ssl/openldap
#TLS_REQCERT ([demand],never,allow,try)
TLS_REQCERT allow
Si quelqu"un à une idée pour me mettre sur la voie ça m’aidrai énormément car je sèche.
Merci
Olivier