Installing on Debian

A brief description on how to install it on Debian Jessie or later

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 build-essential libsasl2-dev libldap-dev python-virtualenv python-dev python-setuptools python-netaddr

Optional but useful

For automagically converting jpegPhoto attribute values:

apt-get install python-imaging python-m2crypto python-dns python-excelerator python-paramiko

web2ldap application (unpack, move and check)

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

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

Initialize Python virtual environment:

python2.7 -m virtualenv -v --system-site-packages /opt/web2ldap

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:

/opt/web2ldap/bin/pip2.7 install python-ldap pyweblib pyasn1 pyasn1_modules

web2ldap application (continued)

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

/opt/web2ldap/bin/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:

/opt/web2ldap/bin/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 /opt/web2ldap/lib/python2.7/site-packages/

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

cp /opt/web2ldap/fcgi/ /opt/web2ldap/fcgi/
sed 's|/usr/bin/python|/opt/web2ldap/bin/python|' /opt/web2ldap/fcgi/ > /opt/web2ldap/fcgi/
cp /opt/web2ldap/etc/httpd/sample-mod_fcgid-2.4.conf /etc/apache2/conf-available/web2ldap-fcgid.conf
$EDITOR /etc/apache2/conf-available/web2ldap-fcgid.conf
a2enconf  web2ldap-fcgid.conf
service apache2 reload

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


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