I am using pam-mysql authentication for both ftp and email in Etch, and
with proftpd it works just fine, while for email (courier - authdaemond)
it doesn't work.

Maybe the bug is actualy in authdaemon (or maybe some PAM clients in
general) related rather then PAM itself? Or it works with proftpd just
because it uses pam-mysql only in the "auth" stanza, but not in the
"account" stanza (see the config files below for details)?

The already mentioned LD_PRELOAD export hack in
/etc/init.d/courier-authdaemon solves the problem, but it's nasty.

Failure log entries:
Oct 15 01:36:44 tallis authdaemond: PAM unable to
dlopen(/lib/security/pam_mysql.so)
Oct 15 01:36:44 tallis authdaemond: PAM [dlerror:
/lib/security/pam_mysql.so: undefined symbol: pam_get_item]
Oct 15 01:36:44 tallis authdaemond: PAM adding faulty module:
/lib/security/pam_mysql.so

Packages versions:
courier-authdaemon 0.58-4
libpam-mysql 0.6.2-1

related libpam config files:
/etc/pam.d/proftpd (Works fine despite it uses pam-mysql!):
auth required pam_mysql.so user=pamuser passwd=pampass host=127.0.0.1
db=userdb table=ftp usercolumn=username passwdcolumn=password crypt=1
account required pam_mysql.so user=pamuser passwd=pampass host=127.0.0.1
db=userdb table=ftp usercolumn=username passwdcolumn=password crypt=1
auth       required     pam_listfile.so item=user sense=deny
file=/etc/ftpusers onerr=succeed

/etc/pam.d/imap (same as pop3, doesn't work due to the bug):
auth required /lib/security/pam_warn.so
auth required pam_mysql.so user=pamuser passwd=pampass host=127.0.0.1
db=userdb table=email usercolumn=username passwdcolumn=password crypt=1
account required pam_unix.so


Regards,

Stepan




Reply via email to