m(Reverted edit of Draconianintros, changed back to last version by Zyghom)

(3 intermediate revisions by 3 users not shown)

Line 22:

Line 22:

:<pre>sudo /etc/init.d/slapd stop</pre>

:<pre>sudo /etc/init.d/slapd stop</pre>

*folder for storing data:

*folder for storing data:

−

:make directory where you LDAP will store data - by default it is /var/run/slapd bud I don't recommend it for backup purposes (in case your root partition is to be reinstalled - OS crashed or whatever - then LDAP db is also vanished - my proposal is to use i.e. directory /home/ldap

+

:make directory where your LDAP will store data - by default it is /var/run/slapd but i don't recommend it for backup purposes (in case your root partition is to be reinstalled - OS crashed or whatever - then LDAP db is also vanished - my proposal is to use i.e. directory /home/ldap

::<pre>sudo mkdir /home/ldap</pre>

::<pre>sudo mkdir /home/ldap</pre>

:Because Ubuntu by default runs slapd daemon as user openldap (created automatically during slapd installation), then we must change the ownership of this directory:

:Because Ubuntu by default runs slapd daemon as user openldap (created automatically during slapd installation), then we must change the ownership of this directory:

Line 204:

Line 204:

=AUTOMATIC LDAP CREATION AND CONFIGURATION=

=AUTOMATIC LDAP CREATION AND CONFIGURATION=

−

*If you are brave enough you can use the script I prepared to do all steps mentioned above in just one step <b>without reconfiguring claws-mail</b>

+

*If you are brave enough (joke) you can use the script I prepared. It does all steps mentioned above (except reconfiguring claws-mail: <b>this one must do by himself</b>).

:Just save all lines to text file, i.e:

:Just save all lines to text file, i.e:

:<pre>gedit (or kedit) /tmp/ldap.sh</pre>

:<pre>gedit (or kedit) /tmp/ldap.sh</pre>

Line 323:

Line 323:

ls -la /home/ldap

ls -la /home/ldap

</pre></code>

</pre></code>

+

=GUARANTEE AND RESPONSIBILITY=

=GUARANTEE AND RESPONSIBILITY=

*sorry but nothing like this

*sorry but nothing like this

*in case of problems you can contact me by mail: zyghomATyahooDOTcoDOTuk

*in case of problems you can contact me by mail: zyghomATyahooDOTcoDOTuk

LDAP and Claws Mail HOWTO based on Kubuntu (7.10)

Example describes installation and configuration on Ubuntu 7.10 but should be valid for other distributions also.
It covers:

openldap installation and configuration

claws-mail configuration to use with LDAP

REMOVING OLD INSTALLATION

In case slapd is already installed, either go to point #CONFIGURATION or reinstall it with commands:

sudo apt-get purge slapd

sudo rm -rf /etc/ldap

(in case your LDAP configuration is not yet in use)

sudo rm -rf /var/run/slapd

(in case your LDAP database is not yet filled)

INSTALLATION

Install slapd:

sudo apt-get install slapd

during installation Ubuntu usually asks you for ldap admin password - use any - even empty - later we can change it anyway

CONFIGURATION

make sure to shut down LDAP server after installation:

sudo /etc/init.d/slapd stop

folder for storing data:

make directory where your LDAP will store data - by default it is /var/run/slapd but i don't recommend it for backup purposes (in case your root partition is to be reinstalled - OS crashed or whatever - then LDAP db is also vanished - my proposal is to use i.e. directory /home/ldap

sudo mkdir /home/ldap

Because Ubuntu by default runs slapd daemon as user openldap (created automatically during slapd installation), then we must change the ownership of this directory:

sudo chown -R openldap:openldap /home/ldap

as an alternative is to change default behaviour of slapd in file /etc/default/slapd the line:

SLAPD_USER="openldap"

should be changed to:

SLAPD_USER=

and in this case slapd runs as root and changing ownership is not needed - in this HOWTO we change the ownership to avoid the mismatch with Ubuntu default settings

ok, claws should be ready to cooperate with LDAP
in addressbook you should see now "Myserver" under LDAP Servers
go to field "Lookup name" and type i.e. homonto and press Find
you should see my name there

AUTOMATIC LDAP CREATION AND CONFIGURATION

If you are brave enough (joke) you can use the script I prepared. It does all steps mentioned above (except reconfiguring claws-mail: this one must do by himself).

Just save all lines to text file, i.e:

gedit (or kedit) /tmp/ldap.sh

and make it executable:

chmod +x /tmp/ldap.sh

Then run the script:

sudo /tmp/ldap.sh

when asked for LDAP password just pres Enter - it is later changed by script to "password" (without quotes)