Installing on Debian Squeeze/Wheezy

A brief description on how to install it on Debian Squeeze or Wheezy

Notes in advance

Debian packages

These packages are required for compiling/installing python-ldap via Python's setuptools (see easy_install below):

apt-get install gcc (maybe more related packages)
apt-get install libsasl2-dev libldap-dev python-dev python-setuptools python-netaddr

Optional but useful

For automagically converting jpegPhoto attribute values:

apt-get install python-imaging python-m2crypto

PyPI source packages

Some required modules are not available as Debian packages or the Debian packages are too old (especially python-ldap).
So we proceed here with Python setup tools which automagically downloads and build the latest releases from PyPI repository.

Set proxy settings if needed:

export http_proxy=""
export https_proxy=""
export ftp_proxy=""

Install needed modules:

easy_install python-ldap
easy_install pyweblib
easy_install pyasn1
easy_install pyasn1_modules

Optional but useful modules

easy_install pydns
easy_install pyexcelerator

web2ldap application

Unpack, move and check

Grab web2ldap source, extract anywhere and it move to /opt/web2ldap:

tar xzf web2ldap-1.2.74.tar.gz --no-same-owner
mv web2ldap-1.2.74 /opt/web2ldap

Check whether all software is installed - watch out for errors and warnings:

python /opt/web2ldap/sbin/

Relax the IP restrictions by editing bind_address and access_allowed in file /opt/web2ldap/etc/web2ldap/web2ldapcnf/ if you want to make web2ldap accessible by others over network.

For testing start built-in HTTP server listening on all interfaces:

python /opt/web2ldap/sbin/ -l -d off

Access it with your browser:


Integrate with Apache/mod_fcgid

Install packages for running as FastCGI server:

apt-get install apache2-mpm-prefork libapache2-mod-fcgid
wget -O /usr/lib/pymodules/python/

Copy sample web2ldap's configuration and edit to suit your needs (e.g. allowed IP addresses):

cp /opt/web2ldap/etc/httpd/sample-mod_fcgid-2.2.conf /etc/apache2/conf.d/web2ldap-fcgid.conf
$EDITOR /etc/apache2/conf.d/web2ldap-fcgid.conf
/etc/init.d/apache2 restart

Access it with your browser (takes a bit longer the first time):


or if your server already is configured with SSL/TLS enabled: