pam_mysql auth failure

From: Igor (igor at elco dot com dot ua)
Date: Fri Mar 12 2004 - 08:17:26 EST

  • Next message: Ken Murchison: "Re: pam_mysql auth failure"

    Hello,
    sorry if it was discused before I could not find any solution
    in archieve.

    FreeBSD-5.1R,
    mysql-client-4.0.18
    mysql-server-4.0.18
    pam_mysql-0.5_1
    cyrus-imapd-2.2.3
    cyrus-sasl-2.1.17_1
    cyrus-sasl-saslauthd-2.1.17_1
    (everything installed via ports collection)

    I need to authenticate users in MySQL db,
    cause of encrypted password I've decided to use pam_mysql.
    I've set up conf files according to bits of doc,
    when I check my configuration using
    testsaslauthd authentication fails despite of user name
    and password are correct:

    /var/log/auth.log
    Mar 12 13:58:13 igor saslauthd[1300]: pam_sm_authenticate called.
    Mar 12 13:58:13 igor saslauthd[1300]: dbuser changed.
    Mar 12 13:58:13 igor saslauthd[1300]: dbpasswd changed.
    Mar 12 13:58:13 igor saslauthd[1300]: host changed.
    Mar 12 13:58:13 igor saslauthd[1300]: database changed.
    Mar 12 13:58:13 igor saslauthd[1300]: table changed.
    Mar 12 13:58:13 igor saslauthd[1300]: usercolumn changed.
    Mar 12 13:58:13 igor saslauthd[1300]: passwdcolumn changed.
    Mar 12 13:58:13 igor saslauthd[1300]: crypt changed.
    Mar 12 13:58:13 igor saslauthd[1300]: sqllog changed.
    Mar 12 13:58:13 igor saslauthd[1300]: db_connect called.
    Mar 12 13:58:13 igor saslauthd[1300]: returning 0 .
    Mar 12 13:58:13 igor saslauthd[1300]: db_checkpasswd called.
    Mar 12 13:58:13 igor saslauthd[1300]: pam_mysql: where clause =
    Mar 12 14:42:55 igor saslauthd[1301]: SELECT password FROM mailboxtable WHERE
    Name='mbox'
    Mar 12 13:58:13 igor saslauthd[1300]: sqlLog called.
    Mar 12 13:58:13 igor saslauthd[1300]: returning 0 .
    Mar 12 13:58:13 igor saslauthd[1300]: returning 0.
    Mar 12 13:58:13 igor saslauthd[1300]: do_auth : auth failure: [user=mbox
    ] [service=imap] [realm=] [mech=pam] [reason=PAM acct error]

    /var/db/mysql/db.log
    040312 13:58:13 connect user at dbhost on db
                         32 Init DB db
                         32 Query SELECT password FROM mailboxtable WHERE Name='mbox'

    /etc/imapd.conf
    sasl_pwcheck_method: saslauthd

    /etc/pam.d/imap
    auth required /usr/lib/pam_mysql.so user=dbuser passwd=dbpassword
    host=dbhost db=maildb table=mailboxtable usercolumn=Name
    passwdcolumn=password crypt=2 sqllog=0

    saslauthd is run with '-a pam'

    What's wrong? There is no other error message in log files.
    May be it's because of "sqlLog called"? Then why it's "called"
    if sqllog=0 ?

    Thanks in advance...
    Igor


  • Next message: Ken Murchison: "Re: pam_mysql auth failure"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD