J’ai décidé de compiler LDAP avec SLL directement, ça fonctionne, mais j’ai une erreur quand, je veux démarrer mon serveur slapd avec cette commande
./slapd -d127 -h "ldap:/// … -f /usr/local/etc/openldap/slapd.conf
@(#) $OpenLDAP: slapd 2.4.23 (Apr 1 2011 15:34:33) $
root@debian6:/home/simon/openldap-2.4.23/servers/slapd
ldap_pvt_gethostbyname_a: host=exemple, r=0
daemon_init: …[/url] [url=ldaps:///]…
daemon_init: listen on …
daemon_init: listen on …
daemon_init: 2 listeners to open…
ldap_url_parse_ext(ldap:///)
daemon: listener initialized …
ldap_url_parse_ext(ldaps:///)
daemon: listener initialized …
daemon_init: 4 listeners opened
ldap_create
slapd init: initiated server.
bdb_back_initialize: initialize BDB backend
bdb_back_initialize: Berkeley DB 4.8.30: (April 9, 2010)
hdb_back_initialize: initialize HDB backend
hdb_back_initialize: Berkeley DB 4.8.30: (April 9, 2010)
reading config file /usr/local/etc/openldap/slapd.conf
line 17 (pidfile /usr/local/var/run/slapd.pid)
line 18 (argsfile /usr/local/var/run/slapd.args)
line 20 (TLSCipherSuite HIGH:MEDIUM:+TLSv1:+SSLv2:+SSLv3 )
line 21 (TLSCertificateFile /usr/local/etc/openldap/CA/server.pem )
line 22 (TLSCertificateKeyFile /usr/local/etc/openldap/CA/server.key )
line 23 (TLSCACertificateFile /usr/local/etc/openldap/CA/cacert.pem )
line 24 (TLSVerifyClient never)
line 52 (access to * by self write by users read by anonymous auth)
line 64 (database hdb)
hdb_db_init: Initializing HDB database
line 65 (suffix “dc=exemple,dc=com”)
dnPrettyNormal: <dc=exemple,dc=com>
=> ldap_bv2dn(dc=exemple,dc=com,0)
<= ldap_bv2dn(dc=exemple,dc=com)=0
ldap_err2string
/usr/local/etc/openldap/slapd.conf: line 65: invalid DN 21 (Invalid syntax)
slapd destroy: freeing system resources.
slapd stopped.
Voila mes fichiers de config
/etc/ldap/ldap.conf
LDAP Defaults
See ldap.conf(5) for details
This file should be world readable but not world writable.
BASE dc=exemple,dc=com
URI adresse… ip de la machine
tls_checkpeer yes
tls_ciphers HIGH
ssl yes
tls_cacert /usr/local/etc/openldap/CA/cacert.pem
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
/usr/local/etc/openldap/slapd.conf
See slapd.conf(5) for details on configuration options.
This file should NOT be world readable.
#include /usr/local/etc/openldap/schema/core.schema
#include /usr/local/etc/openldap/schema/cosine.schema
#include /usr/local/etc/openldap/schema/nis.schema
#include /usr/local/etc/openldap/schema/inetorgperson.schema
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 root.openldap.org…
pidfile /usr/local/var/run/slapd.pid
argsfile /usr/local/var/run/slapd.args
TLSCipherSuite HIGH:MEDIUM:+TLSv1:+SSLv2:+SSLv3
TLSCertificateFile /usr/local/etc/openldap/CA/server.pem
TLSCertificateKeyFile /usr/local/etc/openldap/CA/server.key
TLSCACertificateFile /usr/local/etc/openldap/CA/cacert.pem
TLSVerifyClient never
Load dynamic backend modules:
modulepath /usr/local/libexec/openldap
moduleload back_hdb
moduleload back_hdb.la
moduleload back_ldap.la
Sample security restrictions
Require integrity protection (prevent hijacking)
Require 112-bit (3DES or better) encryption for updates
Require 63-bit encryption for simple bind
security ssf=1 update_ssf=112 simple_bind=64
Sample access control policy:
Root DSE: allow anyone to read it
Subschema (sub)entry DSE: allow anyone to read it
Other DSEs:
Allow self write access
Allow authenticated users read access
Allow anonymous users to authenticate
Directives needed to implement policy:
access to dn.base="" by * read
access to dn.base=“cn=Subschema” by * read
access to *
by self write
by users read
by anonymous auth
if no access controls are present, the default policy
allows anyone and everyone to read anything but restricts
updates to rootdn. (e.g., “access to * by * read”)
rootdn can always read and write EVERYTHING!
#######################################################################
BDB database definitions
#######################################################################
database hdb
suffix “dc=exemple,dc=com”
rootdn “cn=admin,dc=exemple,dc=com”
rootpw {SSHA}bgFRgv7+wknb3Xj7WVda3js/Hx8n6Yw2
Cleartext passwords, especially for the rootdn, should
be avoid. See slappasswd(8) and slapd.conf(5) for details.
Use of strong authentication encouraged.
rootpw secret
The database directory MUST exist prior to running slapd AND
should only be accessible by the slapd and slap tools.
Mode 700 recommended.
directory /usr/local/var/openldap-data
Indices to maintain
index objectClass eq
index uid eq
Je vois bien quil me dit quil y a une erreur de syntaxe, mais je ne vois rien.
De plus, je ne trouve pu mes schémas, jai cherché dans /usr/local/etc/openldap/schema mais je nest rien trouver.
Merci à lavance
Edité le 06/04/2011 à 16:06