How to Configure phpLDAPadmin in Ubuntu?

| | 2 min read

LDAP stands for Lightweight Directory Access Protocol, which was designed to store and retrieve data centrally. Install OpenLDAP and phpLDAPadmin, before reading the configuration steps.

Hope the packages were already installed, we can start configuring a few things, to connect with the OpenLDAP directory structure, created during the LDAP configuration stage.

First, we can update the main configuration file with root privileges for the editor

sudo nano /etc/phpldapadmin/config.php


If you are comfortable with VIM editor use,

sudo vi /etc/phpldapadmin/config.php


sudo vim /etc/phpldapadmin/config.php

We can start updating the configuration details in the file.

  • Update the host parameter to your public IP address or custom domain name.

    This will be based on how you are planning to access the 'phpLDAPadmin web interface'.
  • Configure Domain Base Name for the LDAP Server.

    We need to traslate the domain name into LDAP syntax by replacing each components in domain to dc specification. For a domain '', we can use like dc=example,dc=com. The base parameter can be set as following,


    Configure Login Bind_id.

    We need to update the login bind_id parameter, For that, we just need to update the dc parameter again, additionally it will have the cn parameter, which will be already set to "admin".
  • Finally, we need to Configure the Visibility of Warning Messages.

    Few annoying warning messages will be thrown by default phpLDAPadmin, regarding the template files, which does not have any impact on the functionality. We can simply hide those warnings by updating the 'hide_template_warning' parameter, which will be commented by default. Uncomment the line and set the value to 'true'.
    $config->custom->appearance['hide_template_warning'] = true;
  • Save and Close the File.

    If you are using Vim editor, then press ESC and type,
    'w' for write and 'q' for quit.

You are Done!