Changes between Version 20 and Version 21 of Howto_Ldap


Ignore:
Timestamp:
Jan 14, 2011 6:08:30 PM (2 years ago)
Author:
andudi
Comment:

finally added

Legend:

Unmodified
Added
Removed
Modified
  • Howto_Ldap

    v20 v21  
    1010- the LDAP server is running on the same host as Roundcube 
    1111- the static config file is used instead of the newer dynamic config directory 
    12 - 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 
     12- security issues are not part of this Howto, neverthelsess it is highly recomanded to disallow connections from other hosts than needed with a firewall 
    1313- this Howto is based and tested on '''Debian Lenny''' and '''Ubuntu 10.10''', but other Distros (and OS?) should do it as well 
    1414If you do not agree with my propositions, help your self to improve your installation! 
     
    133133$ sudo invoke-rc.d slapd restart 
    134134}}} 
    135 If you do not find any errors on the command line, your LDAP server is ready to become a LDAP addressbook server :-) 
     135If you do not find any errors here, your LDAP server is ready now to become a LDAP addressbook server :-) 
     136 
    136137 
    137138== Setup the LDAP Server == 
     
    145146If you get '''No such object (32)''' this means that the LDAP directory is still empty, else you can get all the preconfigured entries. 
    146147 
    147 Next we have to setup a directory structure such that Roundcube can operate on it. Use the following shell script (bash) as administrator on the server (sudo or as root): 
    148 {{{ 
    149  
    150 }}} 
     148Next we have to setup a directory structure such that Roundcube can operate on it. Download the following shell script, configure the first few lines in it, and execute it as administrator on the server (sudo or as root): [[http://trac.roundcube.net/raw-attachment/wiki/Howto_Ldap/rcabook-setup.sh|rcabook-setup.sh]] 
     149 
     150You should get something like that: 
     151{{{ 
     152$ sudo bash rcabook-setup.sh 
     153This script prepares an openLDAP server for a simple 
     154addressbook, working "out of the box" with Roundcube: 
     155 
     156  server: ldap://localhost:389 
     157  org   : Local LDAP Addressbook Server 
     158  config: /etc/ldap/slapd.conf 
     159  suffix: dc=localhost 
     160  rootdn: cn=admin,dc=localhost 
     161 
     162-create the openLDAP base directory: dc=localhost 
     163  (as LDAP administator: cn=admin,dc=localhost) 
     164  Enter LDAP Password:  
     165adding new entry "dc=localhost" 
     166 
     167-create the addressbook user: cn=rcuser,dc=localhost 
     168  (as LDAP administator: cn=admin,dc=localhost) 
     169  Enter LDAP Password:  
     170adding new entry "cn=rcuser,dc=localhost" 
     171 
     172-create addressbook base directory: ou=rcabook,dc=localhost 
     173  (as LDAP administator: cn=admin,dc=localhost) 
     174  Enter LDAP Password:  
     175adding new entry "ou=rcabook,dc=localhost" 
     176 
     177-create subdirectory for contacts: ou=contacts,ou=rcabook,dc=localhost 
     178  (as Roundcube user: cn=rcuser,dc=localhost) 
     179adding new entry "ou=contacts,ou=rcabook,dc=localhost" 
     180 
     181-create subdirectory for groups: ou=groups,ou=rcabook,dc=localhost 
     182  (as Roundcube user: cn=rcuser,dc=localhost) 
     183adding new entry "ou=groups,ou=rcabook,dc=localhost" 
     184 
     185The LDAP addressbook is ready now for using: 
     186  base_dn: ou=rcabook,dc=localhost 
     187  bind_dn: cn=rcuser,dc=localhost 
     188   
     189Use the following command for reading and checking your setup: 
     190  ldapsearch -xLLL -H ldap://localhost:389 -D cn=rcuser,dc=localhost -w rcpass -b dc=localhost 
     191}}} 
     192If you run the proposed ldap search query, you should get something like: 
     193{{{ 
     194$ ldapsearch -xLLL -H ldap://localhost:389 -D cn=rcuser,dc=localhost -w rcpass -b dc=localhost 
     195dn: dc=localhost 
     196objectClass: top 
     197objectClass: dcObject 
     198objectClass: organization 
     199dc: localhost 
     200o: Local LDAP Addressbook Server 
     201 
     202dn: cn=rcuser,dc=localhost 
     203cn: rcuser 
     204userPassword:: e1NTSEF9TzZERjI2WXB1a1FKcS93V0NKWFJpL0FBY2hia3czdEk= 
     205objectClass: organizationalRole 
     206objectClass: simpleSecurityObject 
     207 
     208dn: ou=rcabook,dc=localhost 
     209ou: rcabook 
     210objectClass: top 
     211objectClass: organizationalUnit 
     212 
     213dn: ou=contacts,ou=rcabook,dc=localhost 
     214ou: contacts 
     215objectClass: top 
     216objectClass: organizationalUnit 
     217 
     218dn: ou=groups,ou=rcabook,dc=localhost 
     219ou: groups 
     220objectClass: top 
     221objectClass: organizationalUnit 
     222}}} 
     223If you see at least this 5 entries, your LDAP addressbook server is now ready to be filled with content. 
     224 
     225 
    151226== Configure Roundcube == 
     227 
     228 
     229== Other Clients than Roundcube == 
     230There exists a lot of addressbook clients that can connect to a LDAP server. The most of them do not support contact groups yet, and the number of supported contact fields is often verry limited (please let me now if your expericance is different). 
     231 
     232Usually you have to set the following fields: 
     233- the hostname, or even the IP address 
     234- the ldap port: 389 
     235- the bind_dn: "cn=rcuser,dc=localhost" 
     236- the bind_pw: rcpass 
     237- the base_dn: "ou=contacts,ou=rcabook,dc=localhost" 
     238- optional a filter: object_class=inetOrgPerson 
     239 
     240== Finally == 
     241If you have answers about this Howto, or even if you do not agree with something: please send an email to andudi[at]gmx[dot]ch or even to the Roundcube developer mail list, thanks. 
     242 
     243Andreas Dick