Active Directory,  Ubuntu

Installing phpLDAPadmin

phpLDAPadmin is a tool that can be used to walk LDAP trees and view attributes of objects located within them using a web browser. This isn’t to say that it’s the prettiest tool out there but it works really well and is portable between various flavors of LDAP.

Before you can use phpLDAPadmin you will need Apache. In Ubuntu, Apache can be installed using apt-get:

apt-get install apache2

Once you have Apache installed, downloading phpLDAPadmin and installing it in Ubuntu Server 10 couldn’t be easier, just apt-get the package:

apt-get install phpldapadmin

Now you have the pieces, let’s copy phpLDAPadmin into your web root directory:

cp -R /usr/share/phpldapadmin /var/www/myphpldapadmin

In that new directory you will see a config file. Here, you’ll see some lines that appear as follows:

$ldapservers->SetValue($i,’server’,’name’,’My LDAP Server’);  // The name to display
$ldapservers->SetValue($i,’server’,’host’,’127.0.0.1′);  // Address of the LDAP server
$ldapservers->SetValue($i,’server’,’port’,’389′);   // Port number
$ldapservers->SetValue($i,’server’,’base’,array(‘dc=example,dc=com’));  // Base dn
$ldapservers->SetValue($i,’login’,’string’,’uid=<username>,ou=People,dc=example,dc=com’);

You’ll want to provide the address, port number (if the port isn’t 389) and DN information of your server and then connected by visiting the website created via Apache (if the server name were ldapserver.local, this might be http://ldapserver.local/phpLDAPadmin). Provide the username and password and you should be able to use phpLDAPadmin. Happy LDAP’ing!