Installing an openldap server with replication, to manage user
accounts, access rights and other information. Cyphering will be used
to protect communications, except when done from the localhost.
[x] ACCESSLOG With In-Directory Access Logging overlay
[x] AUDITLOG With Audit Logging overlay
[x] COLLECT With Collect overy Services overlay
[x] CONSTRAINT With Attribute Constraint overlay
[x] DDS With Dynamic Directory Services overlay
[x] DEREF With Dereference overlay
[x] DYNAMIC_BACKENDS Build dynamic backends
[x] DYNGROUP With Dynamic Group overlay
[x] DYNLIST With Dynamic List overlay
[x] FETCH Enable fetch(3) support
[ ] GSSAPI With GSSAPI support (implies SASL support)
[x] MDB With Memory-Mapped DB backend
[x] MEMBEROF With Reverse Group Membership overlay
[x] PBKDF2 With PBKDF2 hash password support
[x] PPOLICY With Password Policy overlay
[x] PROXYCACHE With Proxy Cache overlay
[x] REFINT With Referential Integrity overlay
[x] RELAY With Relay backend
[x] RETCODE With Return Code testing overlay
[ ] RLOOKUPS With reverse lookups of client hostnames
[x] RWM With Rewrite/Remap overlay
[x] SASL With (Cyrus) SASL2 support
[x] SEQMOD With Sequential Modify overlay
[x] SHA2 With SHA2 Password hashes overlay
[ ] SHELL With Shell backend (disables threading)
[ ] SLP With SLPv2 (RFC 2608) support
[x] SMBPWD With Samba Password hashes overlay
[ ] SOCK With Sock backend
[x] SSSVLV With ServerSideSort/VLV overlay
[x] SYNCPROV With Syncrepl Provider overlay
[ ] TCP_WRAPPERS With tcp wrapper support
[x] TRANSLUCENT With Translucent Proxy overlay
[x] UNIQUE With attribute Uniqueness overlay
[x] VALSORT With Value Sorting overlay
Configuration
The configuration is done in the slapd.conf file and other
files can also be included via the include directive.
Basics
Schemas inclusion (core, nis, samba, …):
samba.schema file is not part of the openldap distribution, but must
be recovered from samba.
slapd.conf
1
2
3
4
5
6
# Schema
include /usr/local/etc/openldap/schema/core.schemainclude /usr/local/etc/openldap/schema/cosine.schemainclude /usr/local/etc/openldap/schema/inetorgperson.schemainclude /usr/local/etc/openldap/schema/nis.schemainclude /usr/local/etc/openldap/schema/samba.schema
Debugging information:
slapd.conf
1
2
3
4
# Information about process and debugging
pidfile /var/run/openldap/slapd.pidargsfile /var/run/openldap/slapd.args#loglevel trace conns
Some values are to be adjusted to better manage concurrency,
simultaneous connections, and the lifetime of requests. The DNS
reverse check is suppressed to avoid increasing the latency.
slapd.conf
1
2
3
4
5
6
# Gestion des connections
conn_max_pending100conn_max_pending_auth1000idletimeout10timelimit60reverse-lookupoff
The authz-policy directive allows an authorization by
proxy through the authzTo attribute which must be
specified in the object acting as a proxy. The
authz-regexp performs a conversion of authentication,
especially usefull when it was performed by kerberos.
The data will be stored in the /var/db/openldap-data/example.com
directory, this directory need to be created
with the 0700 permissions and to have ldap as its owner, so that
only the ldap process has access to it.
Defining the type of database, location, and the identity of the
administrator. The password hash is generated with the slappasswd
command.
Tuning the lmdb database for checkpoints, memory allocation, …
slapd.conf
1
2
3
# lmdb DB tuning
checkpoint15060searchstack16
Maintains an index of attributes used in searches to improve performance,
you can need more that what is proposed below.
A modification of the attribut list or the type of indexing requires
the execution of the slapindex command (server down) to
rebuild the index.
slapd.conf
1
2
3
4
5
6
# Index creation
indexobjectClasseqindexuid,uidNumber,gidNumberpres,eqindexcn,sn,givenNamepres,eq,sub,approxindexmailpres,eqindexowner,member,managereq
Maintains the date of last modification, it is automatically update by
the server (needed for the replication process)