[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Courier-imap and LDAP



Hi,

I have a problem authenticating a user who wishes to use IMAP
against LDAP.
My LDAP config works as i can log in and see the appropriate
messages from the logs and i also did a test with a user that
only exists in LDAP and not in PAM and stuff worked.
I also have a working config of Courier with SSL.
The users password for Courier is authenticated via pam:

/etc/courier/authdaemonrc
    authmodulelist="authpam"

My nsswitch configuration file:
/etc/nsswitch.conf
passwd:         ldap compat
group:          ldap compat
shadow:         ldap compat
hosts:          files dns
networks:       files
protocols:      db files
services:       db files
ethers:         db files
rpc:            db files
netgroup:       nis

I thought that since courier was configed to use PAM and PAM
was configed to use LDAP that the courier setup was going to
work. It didn't.
The error i'm getting is Login failed.
An excerpt from /var/log/syslog:

Apr  9 11:23:21 arthur imapd-ssl: Unexpected SSL connection shutdown.
Apr  9 11:23:21 arthur imapd-ssl: Connection, ip=[::ffff:192.168.1.10]
Apr  9 11:23:21 arthur authdaemond.ldap: nss_ldap: reconnecting to LDAP
server...
Apr  9 11:23:21 arthur authdaemond.ldap: nss_ldap: reconnected to LDAP
server after 1 attempt(s)
Apr  9 11:23:21 arthur imapd-ssl: LOGIN FAILED, ip=[::ffff:192.168.1.10]

( I do get that "Unexpected SSL connection shutdown" but it has never
caused problems )

The only way i can use Courier now is to shutdown slapd adn to stop
and then the authentication works:

Apr  9 11:33:07 arthur authdaemond.ldap: nss_ldap: could not connect to
any LDAP server as cn=nss,dc=camelot - Can't contact LDAP server
Apr  9 11:33:07 arthur last message repeated 5 times
Apr  9 11:33:07 arthur authdaemon: nss_ldap: could not connect to any
LDAP server as cn=nss,dc=camelot - Can't contact LDAP server
Apr  9 11:33:07 arthur authdaemon: nss_ldap: could not connect to any
LDAP server as cn=nss,dc=camelot - Can't contact LDAP server
Apr  9 11:33:07 arthur imapd-ssl: LOGIN, user=benedict,
ip=[::ffff:192.168.1.10]

1) Is it possible to have Courier work with LDAP without having to
install courier-ldap? Anyway, i tried to use courier-ldap too and i
get the same error.

2) Can a SSL enabled Courier work with LDAP that doesn't use SSL?

Thanks,
Benedict





Reply to: