Installation and basic configuration of LDAP directory service (OpenLDAP) on Ubuntu:
sudo aptitude install slapd ldap-utils
This description is based on HowtoForge document for Karmic Koala. I used to be to configure of OpenLDAP in slapd.conf
file, but this is old method. Here we have possibility to modify LDAP configuration without restart of LDAP server.
cd /etc/ldap
At first I suggest you to add some schemas, which contains objectclasses and attributes useful later:
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif
If you have problem with addition of above because of insufficient permissions then switch to root with sudo su -
or sudo -i