Cyrus IMAPD with LDAP Authentication

Robert robertedstrom at yahoo.com
Wed Nov 5 00:51:27 EST 2003


Hi, I am trying to setup cyrus imapd version 2.1.15.  I also installed the cyrus sasl 2.1.15 library.  I followed the instructions at http://www.faqs.org/docs/Linux-HOWTO/Cyrus-IMAP.html, but is is fairly outdated.  I currently have user authentication working with LDAP for services like samba, ssh, etc.  The only thing missing is LDAP authentication with cyrus.  I compiled the sasl library with the following options:

./configure \
--disable-krb4 \
--with-openssl=/usr/local/ssl \
--with-dblib=berkeley \
--with-dbdir=/usr/local/BerkeleyDB.4.1 \
--with-bdb-incdir=/usr/local/BerkeleyDB.4.1/include \
--with-bdb-libdir=/usr/local/BerkeleyDB.4.1/lib \
--with-ldap 

I did a make and a make install.  I then configured cyrus imapd with the following options:

./configure \
--without-krb \
--with-auth=unix \
--with-openssl=/usr/local/ssl \
--with-dbdir=/usr/local/BerkeleyDB.4.1 \
--with-bdb-libdir=/usr/local/BerkeleyDB.4.1/lib \
--with-bdb-incdir=/usr/local/BerkeleyDB.4.1/include \
--with-auth=unix

I also did a make and a make install.  My imapd.conf file looks like:

        configdirectory: /var/imap
        partition-default: /var/spool/imap
        admins: robert cyrus root
        srvtab: /var/imap/srvtab
        allowanonymouslogin: no
        allowplaintext: yes
        sasl_passwd_check: saslauthd

I adjusted the prefork.conf so that the regular imap service is enabled.  I started the saslauthd service with the ldap mech. 

I used the testsaslauthd program and I was successfuly authenticated using a user account in ldap.

./testsaslauthd -u robert -p password -f /var/run/mux/mux
0: OK "Success."

I adjusted the /usr/local/etc/saslauthd.conf so that it points to the ldap server.

The only thing is that I can't get the imap server to authenticate users via LDAP.  It keeps complaining that the user could not be found in the /etc/sasldb2 file.

Nov  4 15:33:43 Zero imapd[828]: accepted connection
Nov  4 15:33:43 Mail-Server master[1081]: about to exec /usr/cyrus/bin/imapd
Nov  4 15:33:43 Zero imap[1081]: executed
Nov  4 15:33:43 Zero imapd[828]: unable to open Berkeley db /etc/sasldb2: Invalid argument
Nov  4 15:33:43 Zero imapd[828]: unable to open Berkeley db /etc/sasldb2: Invalid argument
Nov  4 15:33:43 Zero imapd[828]: badlogin: oracles[192.168.0.1] plaintext robert SASL(-13): user not found: checkpass failed
Nov  4 15:33:46 Zero imapd[829]: accepted connection
Nov  4 15:33:46 Zero imapd[829]: unable to open Berkeley db /etc/sasldb2: Invalid argument
Nov  4 15:33:46 Zero imapd[829]: unable to open Berkeley db /etc/sasldb2: Invalid argument
Nov  4 15:33:46 Zero imapd[829]: badlogin: oracles[192.168.0.1] plaintext robert SASL(-13): user not found: checkpass failed

What am I doing wrong?

Thanks in advance for your help.
Robert.



---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.andrew.cmu.edu/mailman/private/info-cyrus/attachments/20031104/12ac6686/attachment.html


More information about the Info-cyrus mailing list