Debian Squeeze LDAP Server With OpenLDAP And phpLDAPadmin

This tutorial will show you how you can set up an LDAP and webinterface to manage the LDAP server on Debian Squeeze.

phpLDAPadmin url:

See screenshots of phpLDAP admin here:

Server name:

Domain name:
Server IP:

Now we want to make sure the server is up to date:

apt-get update
apt-get upgrade

First we install slapd and create a password for administrator:

apt-get install slapd

When prompted enter a password for the administrator of the LDAP server, I choose the password passw0rd in this example.

Now we need to install ldap-utils and phpLDAPadmin, now apache2 and php will also be installed because it's a part of the dependencies for phpLDAPadmin.

apt-get install ldap-utils phpldapadmin

Open /etc/ldap/ldap.conf with your editor, e.g. nano:

nano /etc/ldap/ldap.conf

and uncomment  BASE and URI and edit so it looks like this:

# LDAP Defaults

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

BASE dc=example,dc=com
URI ldap://

#DEREF never

If you want to edit domain name I recommend to run following command:

dpkg-reconfigure slapd

Select NO and follow the guide, type in your domain, e.g., choose recommend settings.

Now open /etc/phpldapadmin/config.php:

$servers = new Datastore();
$servers->setValue('server','name','My LDAP Server');

Your server is now up and running, ready to be used. and you should be able to access phpLDAPadmin on; log in with following password passw0rd

You should also read this page if you like me have problems creating posix groups + users:

Share this page:

Suggested articles

3 Comment(s)

Add comment


By: Raymond Pettersen

Extend this guide to something decent, or drop it. Atleast include some ldiff examples on how to create base, groups, and users.

By: Anonymous

Would be nice a Debian Sqeeuze Howto about OpenLDAP with Kerberos & Samba primair domain controller.

By: Anonymous

clean and straightforward, very nice, dont listen to those "you didnt solve my specific problem" comments