Basic

The configuration of the LDAP server slapd of openLDAP is in /etc/ldap/slapd.conf

A basic configuration would be like this:

Basic LDAP COnfiguration
# Schema and objectClass definitions, basic configuration
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/inetorgperson.schema
include /etc/ldap/schema/openldap.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/misc.schema
# Force entries to match schemas for their ObjectClasses
schemacheck on
# Password hash, default crypt type
# Puede ser: {SHA}, {MD5}, {MD4}, {CRYPT}, {CLEARTEXT}
password-hash {CRYPT}
# Default search base
defaultsearchbase "dc=CHAOSDIMENSION,dc=ORG"
#Used by init scripts to stop and to start the server.
pidfile /var/run/slapd.pid
# Arguments passed to the server.
argsfile /var/run/slapd.args
# Level of log information
loglevel 1024
# Where and which modules load
modulepath /usr/lib/ldap
moduleload back_bdb # Berkeley BD version 4
#definitions of the database
database bdb
# The base of the directory
suffix "dc=CHAOSDIMENSION,dc=ORG"
# Here is the definition of the administrator of the directory and his key
# In this example is " tester"
# The crypt key can be extract with
# makepasswd -crypt -clearfrom file_with_user_name
rootdn "cn=ldapadmin,dc=CHAOSDIMENSION,dc=ORG"
rootpw {crypt}OuorOLd3VqvC2
# here are the attributes that we indexed to make searchs
index default sub
index uid,mail eq
index cn,sn,givenName,ou pres,eq,sub
index objectClass pres,eq
# Directory where the database is located
directory " /var/lib/ldap"
# We say if wished to keep the date of the last modification
lastmod off
#Administrator access
access to *
by dn="cn=ldapadmin,dc=CHAOSDIMENSION,dc=ORG" =wrscx
by dn.regex="uid=[^{}/]+/admin\+(realm=CHAOSDIMENSION.LOCAL)?" =wrscx
by * read
End

aescanero AT gmail.com