| Version 15 (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 the domainname (or suffix) fit well with this Howto: if you want to use another, you have to know (or even find out) how to adapt 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
If you are not asked about the above, like on distros as Ubuntu 9.10 and later, you have to define everything int the configuration file. Then you have to generate a administrator password first:
$ sudo slappasswd
New password:
Re-enter new password:
{SSHA}bCiMXssO6JJ2ZsPikd1qjNuWhApr+fHr
Remember (or even copy) the last line for using later.
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 later are using the config directory instead: in this case you have to change this default behaviour first!
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 do:
$ sudo invoke-rc.d slapd restart
If this command gives no errors, check if the correct config file is used:
$ 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
If you have here -F /etc/ldap/slapd.d/ instead of -f /etc/ldap/slapd.conf, you made something wrong above.
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
