| Version 13 (modified by andudi, 2 years ago) (diff) |
|---|
(This page is still under construction!)
LDAP Addressbook Server for Roundcube
This Howto describes the setup of a simple LDAP addressbook server that should be ready for using with Roundcube "out of the box". The goal is to have an addressbook solution similar to the SQL based one, including contact groups and configurable fields. On the other side should it be possible to connect with any LDAP addressbook client out there.
Since Roundcube 0.5 is not aleb to manage LDAP contact groups, this feature will be available not before Roundcube 0.6. Nevertheless can this LDAP addressbook server allready be used: new contacts do just not belong to a group, they can be added later.
This Howto makes some simplifications that are maybe a good choice for a smal home server, but not what proffessionals would do:
- this Howto is based on OpenLDAP (http://www.openldap.org)
- the LDAP server is running on the same host as Roundcube
- the static config file is used instead of the newer dynamic config directory
- security issues are not part of this Howto, neverthelsess it is highly recomanded to disallow connections from other hosts to the concernig ldap port (389) with a firewall
- this Howto is based and tested on Debian Lenny and Ubuntu 10.10, but other Distros (and OS?) should do it as well
If you do not agree with my propositions, help your self to improve your installation!
Installin the LDAP Server
Install the OpenLDAP following packages (if they are called different on your distro, please let me know):
- slapd : the OpenLDAP server daemon
- ldap-utils : LDAP tools like ldapsearch and ldapadd
- php5-ldap : the PHP bindings later used by Roundcube
E.g. on Debian based systems do:
$ sudo apt-get install slapd ldap-utils php5-ldap
Depending on your distribution (e.g. on Debian Lenny), you will be asked during the installation about:
- domainname : localhost
- organisation : Local LDAP Addressbook Server
- administrator password : mypasswd
The proposed answers for domainname and organisation fit well with this Howto: if you want to change them you have to know how to adapt the dependecies in the following steps! Please change the password to your favorite one!
E.g. on Debian based systems, you can redo this preconfiguration:
$ sudo dpkg-reconfigure slapd
On other distros like Ubuntu 9.10 and above, you have to define the administration password in the configuration file. Then you have to generate it first (in this example the password is mypasswd as well):
$ sudo slappasswd
New password:
Re-enter new password:
{SSHA}bCiMXssO6JJ2ZsPikd1qjNuWhApr+fHr
Configure the LDAP Server
OpenLDAP supports two types of configuration:
- the static config file, usually /etc/ldap/slapd.conf
- the newer dynamic config directory, usually /etc/ldap/slapd.d/
Some distros like Debian Lenny still preconfigure the config file. Others like Ubuntu 9.10 and above are meant to use the config directory instead: then you have to change this behaviour!
E.g. in Ubuntu 10.10 you have to edit the file /etc/default/slapd and change the first entry:
SLAPD_CONF=/etc/ldap/slapd.conf
Now you have to change or create the config file.
Try to restart OpenLDAP then, e.g. on Debian based systems like
$ sudo invoke-rc.d slapd restart
you should now find the server options like:
$ ps -ef | grep slapd openldap 19003 1 0 21:36 ? 00:00:00 /usr/sbin/slapd -g openldap -u openldap -f /etc/ldap/slapd.conf
Preparing the LDAP Server
Configuring Roundcube
Attachments (2)
-
rcabook-setup.sh
(4.5 KB) -
added by andudi 2 years ago.
Roundcube LDAP addressbook setup script
-
slapd.conf
(2.1 KB) -
added by andudi 2 years ago.
Example of an OpenLDAP config file
Download all attachments as: .zip
