[Dovecot] Problems with MySQL/PAM authentication

Allan Joergensen allan at nowhere.dk
Sun Feb 13 11:43:32 EET 2005


Hi,

I'm using (or trying to at least) a combination of PAM/passwd and MySQL 
authentication:

auth vmail {
         mechanisms = plain
         userdb = sql /etc/dovecot/dovecot-sql.conf
         passdb = sql /etc/dovecot/dovecot-sql.conf
         user = root
}

auth system {
         mechanisms = plain
         userdb = passwd
         passdb = pam imap
         user = root
}

MySQL authentication works without problems but authentication real 
(system) users dosn't:

Feb 13 02:05:57 coredump dovecot: auth(vmail): sql(alj,127.0.0.1): 
query: SELECT crypt AS password FROM passwd WHERE id = 'al
j'
Feb 13 02:05:57 coredump dovecot: auth(vmail): sql(alj,127.0.0.1): 
unknown user
Feb 13 02:05:57 coredump dovecot: auth(system): userdb(alj,127.0.0.1): 
uid=10000 gid=1000 home=/home/alj mail=
Feb 13 02:05:57 coredump dovecot: imap-login: Login: alj [127.0.0.1]
Feb 13 02:05:57 coredump dovecot: auth(system): userdb(alj,127.0.0.1): 
uid=10000 gid=1000 home=/home/alj mail=
Feb 13 02:05:57 coredump dovecot: imap-login: Login: alj [127.0.0.1]
Feb 13 02:05:57 coredump dovecot: auth(system): userdb(alj,127.0.0.1): 
uid=10000 gid=1000 home=/home/alj mail=
Feb 13 02:05:57 coredump dovecot: imap-login: Login: alj [127.0.0.1]
Feb 13 02:05:57 coredump dovecot: auth(system): userdb(alj,127.0.0.1): 
uid=10000 gid=1000 home=/home/alj mail=
Feb 13 02:05:57 coredump dovecot: imap-login: Login: alj [127.0.0.1]
Feb 13 02:05:57 coredump dovecot: auth(vmail): file 
auth-client-connection.c: line 31 (auth_client_send): assertion failed: 
(conn->refcount > 1)
Feb 13 02:05:57 coredump dovecot: auth(system): userdb(alj,127.0.0.1): 
uid=10000 gid=1000 home=/home/alj mail=
Feb 13 02:05:57 coredump dovecot: imap-login: Login: alj [127.0.0.1]
Feb 13 02:05:57 coredump dovecot: child 22359 (auth) killed with signal 6
Feb 13 02:05:58 coredump dovecot: auth(vmail): mysql: Connected to 
(null) (vmail)

After a few logins authentication stops working and dovecot needs to be 
restarted.

It seems that the mysql dovecot-auth crashes if the MySQL query does not 
  return anything but only if it is combined with the PAM authentication.

-- 
Allan Joergensen - http://nowhere.dk/
"I believe my plan has a fatal flaw." -- The Brain


More information about the dovecot mailing list