We are going to learn how to administer LDAP using the web interface though you can do that using the command line.phpLDAPadmin provides this functionality thus we are going to install it to help us remove some of the friction of learning the LDAP tools.

You can install the phpLDAPadmin package by typing:

sudo apt-get install phpldapadmin

This installs the administrator interface, enable the necessary Apache virtual hosts files ,and reload Apache.

Configure phpLDAPadmin

We are going to configure some things so that it can connect with the LDAP directory structure that was created during the OpenLDAP configuration stage. Start by opening the main configuration file with root privileges in your text editor.

sudo nano /etc/phpldapadmin/config.php

You will have to add the configuration details that you set up for your  LDAP server. Begin by looking for the host parameter and setting it to your server’s domain name or public IP address. This parameter should reflect the way you plan on accessing the web interface:

$servers->setValue(‘server’,’host’,’server_domain_name_or_IP’);

Then you have to configure the domain name you selected for your LDAP server. In our example we chose test.com. so  have to translate this into LDAP syntax by replacing each domain component into the value of a dc specification except the dot.

It just shows that instead of writing test.com, you will write something like dc=test,dc=com. you should find the parameter that sets the server base parameter and use the format you just discussed to reference the domain you  decided on as an example:

$servers->setValue(‘server’,’base’,array(‘dc=test,dc=com’));

You have to adjust this same thing in our login bind_id parameter. The cn parameter is already set as “admin”. This is correct. You  just need to adjust the dc portions again, just as you did previously:

$servers->setValue(‘login’,’bind_id’,’cn=admin,dc=test,dc=com’);

Lastly you need to adjust a setting that controls the visibility of warning messages. By default phpLDAPadmin have some annoying warning messages in its web interface about the template files that have no impact on the functionality, you can hide these by searching for the hide_template_warning parameter, removing the comments from the line, and setting it to “true”:

$config->custom->appearance[‘hide_template_warning’] = true;

Save and close the file when you have completed this process.

Leave a Reply

You must be logged in to post a comment.