linuxmanage.com

Lightweight Directory Access Protocol

1.Installation

Start with below command to install ldap server:

apt-get install slapd
and answer to questions regarding administrator password:

2.Configuration

dpkg-reconfigure slapd
and follow screenshots available below:

Using slapcat command you will see if reconfiguration changed parameters - mainly dn,o and dc.

# slapcat
dn: dc=debian-space,dc=com
objectClass: top
objectClass: dcObject
objectClass: organization
o: debian-space.com
dc: debian-space
structuralObjectClass: organization
entryUUID: b61c8ba4-ddf5-102e-9462-b33d9d1a6e1b
creatorsName:
createTimestamp: 20090416224659Z
entryCSN: 20090416224659.573595Z#000000#000#000000
modifiersName:
modifyTimestamp: 20090416224659Z
dn: cn=admin,dc=debian-space,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword:: e2N2eXB0fTYwbUl36EhlZXRJZHM=
structuralObjectClass: organizationalRole
entryUUID: b61d65a8-ddf5-102e-9463-b33d9c1a6e1b
creatorsName:
createTimestamp: 20090416224659Z
entryCSN: 20100416224659.579593Z#000000#000#000000
modifiersName:
modifyTimestamp: 20090416224659Z

After ldap configuration you can install phpldapadmin - web fontend administration application

apt-get install phpldapadmin libapache2-mod-php5

Edit /etc/phpldapadmin/config.php. Next find and change (if needed) following lines:

$config->custom->appearance['language'] = 'en';
$ldapservers->SetValue($i,'server','base',array('dc=debian-space,dc=com'));
$ldapservers->SetValue($i,'login','dn','cn=admin,dc=debian-space,dc=com');

Using http://debian-space.com/phpladminadmin/ you will be able to manage your ldap database directory.

In next articles you will find some helpful tips how to use openldap.