I've got LDAP-SASL authentication running using the DIGEST-MD5 mechanism. To accomplish that, I've
followed strictly the steps listed bellow:
Downloaded SleepyCat 4.2.52, compiling and building manually. After downloading,
I've just followed the instructions listed on the file docs/index.html under the directory where I've
unpacked the .tar.gz bundle.
Downloaded Cyrus SASL 2.1.17, unpacking and following the instructions listed on the
document doc/install.html, under the directory where I've unpacked the .tar.gz file. Here there's a point of
attention, you need to run the configure script using some env parameters:
Finally, I've installed OpenLDAP 2.2.5 using the same directions listed on this document, just running
the configure script the same way as SASL's configure:
You'll be prompted for a password. Remember that the username should not be a DN (distinguished name).
Also remember to use the same password as your admin entry on the directory tree.
Now, you should set the sasl-regexp directive in the slapd.conf file before
starting the slapd daemon and testing the authentication. My slapd.conf file resides at
/usr/local/etc/openldap:
The username is taken from sasl and inserted into the ldap search string in the place of $1.Your realm is supposed to be your FQDN (fully qualified domain name), but in some cases it isn't, like mine. To find out what your realm is do: