Changes between Version 27 and Version 28 of Howto_Ldap
- Timestamp:
- Jan 15, 2011 10:02:13 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Howto_Ldap
v27 v28 61 61 By the way, remember the user and group of the slapd daemon, usually '''openldap'''. 62 62 63 Now you have to create/modify the config file '''/etc/ldap/slapd.conf'''. This example config file should just work for this simple Roundcube LDAP addressbook: [[http://trac.roundcube.net/raw-attachment/wiki/Howto_Ldap/slapd.conf|slapd.conf]][[BR]] 64 Some words about this example configuration: 65 - compared to the default slapd.conf file of openldap, all the nonrelevant comments are removed. 63 Now you have to create/modify the config file '''/etc/ldap/slapd.conf''': 64 - [[http://trac.roundcube.net/raw-attachment/wiki/Howto_Ldap/slapd.conf|slapd.conf]] 65 This example config file should just work for the Roundcube LDAP addressbook server described here, but maybe not for other LDAP solutions. Some words about this example configuration: 66 - compared to the default slapd.conf file of OpenLDAP, all the nonrelevant comments are removed. 66 67 - the nis schema is removed because the simple addressbook do not need it. 67 - normally you must not touch anything else than: '''suffix''', '''rootdn''', '''rootpw''' and the '''access''' directives! 68 - if you just follow my Howto, just change the password. 68 - if you just follow my Howto, just change the password ('''rootpw''', use slappasswd to create it). 69 69 70 After you created/modified it, check or even set restrictive permissions for the config file: because the password is stored inside, normal user must not be able to read it!71 User and group must correspond with the ones you found above '''/etc/default/slapd'''.70 After you created/modified it, set restrictive permissions for the config file: since the password is stored inside, normal user must not be able to read it! 71 User and group must correspond with the ones you found above in '''/etc/default/slapd'''. 72 72 {{{ 73 73 $ sudo chmod 640 /etc/ldap/slapd.conf … … 75 75 }}} 76 76 77 Try to restart the OpenLDAP server now, e.g. on Debian based systems do:77 Restart the OpenLDAP server now, e.g. on Debian based systems do: 78 78 {{{ 79 79 $ sudo invoke-rc.d slapd restart … … 83 83 84 84 == Setup the LDAP Server == 85 If the OpenLDAP server is running once, you can start to setup it. First of all, it could be a good choise to check if you can access toit:85 Once the OpenLDAP server is running, you can start to set it up. First of all, it could be a good choise to check if you can even access it: 86 86 {{{ 87 87 $ ldapsearch -xLLL -H ldap://localhost:389 -D cn=admin,dc=localhost -W -b dc=localhost … … 90 90 }}} 91 91 The password must correspond withe the '''rootpw''' in the config file, the -D option corresponds with the '''rootdn''' and the -b with the '''suffix'''. 92 If you get '''No such object (32)''' this means that the LDAP directory is still empty, else you can get all the preconfigured entries.92 If you get '''No such object (32)''', this means that the LDAP directory is still empty, thus is ready to be filled now. 93 93 94 Next 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 oras root): [[http://trac.roundcube.net/raw-attachment/wiki/Howto_Ldap/rcabook-setup.sh|rcabook-setup.sh]]94 We have to setup now 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 with admin privileges on the server (use sudo or even run it as root): [[http://trac.roundcube.net/raw-attachment/wiki/Howto_Ldap/rcabook-setup.sh|rcabook-setup.sh]] 95 95 96 96 You should get something like that:
