Basic LDAP Installation
Introduction
This post is based on Debian 7.8 The server should have a static IP address configured by a DHCP server and not manually set in the LDAP interface configurations. I use 192.168.20.5 as my IP address and my domain is “kirk”. Server has a really unoriginal hostname as LDAP. Normally I should not use root when working with a server but have done so here instead of using sudo. It should be able to used for Ubuntu servers as well.
Install OpenLDAP
Installing OpenLDAP is as follows:
apt-get update
apt-get install slapd ldap-utils
A small configuration starts where it will prompt for creation of a Administrator password. Add one and confirm it.
The ldap software is now install on the system
OpenLDAP Configuration
Configuration is in 2 parts.
- edit of the ldap.conf file
- reconfiguration of the dpkg slapd
First I will edit the configuration file to make the OpenLDAP server match my setup.
nano /etc/ldap/ldap.conf
# LDAP Defaults
##
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
BASE dc=kirk
URI ldap://192.168.20.5
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
# TLS certificates (needed for GnuTLS)
TLS_CACERT /etc/ssl/certs/ca-certificates.crt
In my case hostname was ldap.kirk I have no public domain so my dc=kirk and no more.
Save and restart the slapd service
service slapd restart
Run the “dpkg-reconfigure slapd” reconfigure the LDAP package.
dpkg-reconfigure slapd
It will prompt for some question and for my network it is as followed:
It will automated add my local domain that the server has received from the DHCP server. The same goes for the Organization Unite.
Give an administrative password, and confirm.
I chose the default HDB database based on the configuration recommendation.
I did choose not to delete the db when purged
Select Yes and move the old database files.
I don’t want to use LDAPv2 protocol so I selected No.
LDAP Test
Now to check if the configuration is gone wall:
ldapsearch -x
A successful configuration for the OpenLDAP server.
Next LDAP Posts
- Greating users
- Installing Gosa for easy management
One thought on “Basic LDAP Installation”