[Dovecot] Can't take user info from an alternate file
I'm positive I did everything right to get Dovecot to take usernames and passwords from /etc/dovecot/users, but it still goes for /etc/passwd and /etc/shadow. The format of /etc/dovecot/users is "alice:{PLAIN}plaintextpassword" Here's my "doveconf -n":
# 2.0.19: /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-51-virtual x86_64 Ubuntu 12.04.2 LTS auth_debug = yes auth_verbose = yes auth_verbose_passwords = plain hostname = papasmurf.foobar.com listen = * mbox_write_locks = fcntl passdb { args = scheme=PLAIN-MD5 username_format=%n /etc/dovecot/users driver = passwd-file } plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0664 user = postfix } } ssl_cert = </etc/ssl/certs/dovecot.pem ssl_key = </etc/ssl/private/dovecot.pem userdb { args = username_format=%n /etc/dovecot/users driver = passwd-file }
I'm using Ubuntu Precise and version 2.0.19 of Dovecot.
-- David Griffith dave@661.org
On 12.8.2013, at 22.11, dave@661.org wrote:
I'm positive I did everything right to get Dovecot to take usernames and passwords from /etc/dovecot/users, but it still goes for /etc/passwd and /etc/shadow. The format of /etc/dovecot/users is "alice:{PLAIN}plaintextpassword" Here's my "doveconf -n":
What does Dovecot log when you're logging in?
On Mon, 12 Aug 2013, Timo Sirainen wrote:
On 12.8.2013, at 22.11, dave@661.org wrote:
I'm positive I did everything right to get Dovecot to take usernames and passwords from /etc/dovecot/users, but it still goes for /etc/passwd and /etc/shadow. The format of /etc/dovecot/users is "alice:{PLAIN}plaintextpassword" Here's my "doveconf -n":
What does Dovecot log when you're logging in?
2013-08-12T20:26:44.914861+00:00 papasmurf postfix/smtpd[14219]: connect from ip6-localhost[::1] Aug 12 20:26:44 papasmurf postfix/smtpd[14219]: connect from ip6-localhost[::1] 2013-08-12T20:27:01.880523+00:00 papasmurf postfix/smtpd[14219]: warning: SASL authentication failure: Password verification failed 2013-08-12T20:27:01.880538+00:00 papasmurf postfix/smtpd[14219]: warning: ip6-localhost[::1]: SASL PLAIN authentication failed: authentication failure Aug 12 20:27:01 papasmurf postfix/smtpd[14219]: warning: SASL authentication failure: Password verification failed Aug 12 20:27:01 papasmurf postfix/smtpd[14219]: warning: ip6-localhost[::1]: SASL PLAIN authentication failed: authentication failure
Commands used were "EHLO localhost" and "AUTH PLAIN <base64 stuff>
-- David Griffith dave@661.org
On 12.8.2013, at 23.29, dave@661.org wrote:
What does Dovecot log when you're logging in?
2013-08-12T20:26:44.914861+00:00 papasmurf postfix/smtpd[14219]: connect from ip6-localhost[::1] Aug 12 20:26:44 papasmurf postfix/smtpd[14219]: connect from ip6-localhost[::1] 2013-08-12T20:27:01.880523+00:00 papasmurf postfix/smtpd[14219]: warning: SASL authentication failure: Password verification failed 2013-08-12T20:27:01.880538+00:00 papasmurf postfix/smtpd[14219]: warning: ip6-localhost[::1]: SASL PLAIN authentication failed: authentication failure Aug 12 20:27:01 papasmurf postfix/smtpd[14219]: warning: SASL authentication failure: Password verification failed Aug 12 20:27:01 papasmurf postfix/smtpd[14219]: warning: ip6-localhost[::1]: SASL PLAIN authentication failed: authentication failure
That's Postfix log, not Dovecot log.
On Mon, 12 Aug 2013, Timo Sirainen wrote:
On 12.8.2013, at 23.29, dave@661.org wrote:
What does Dovecot log when you're logging in? [snip] That's Postfix log, not Dovecot log.
Dovecot doesn't emit any logs when I go in through port 25.
I added a line "protocols = imap pop3 lmtp" and installed the relevant packages. I then went in through imap like this:
$ telnet localhost 143 Trying ::1... Connected to localhost. Escape character is '^]'.
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN] Dovecot ready. a login "joe" "blah"
- BYE Internal error occurred. Refer to server log for more information. Connection closed by foreign host.
...and got this in my logs:
Aug 12 20:59:57 auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth Aug 12 20:59:57 auth: Error: passwd-file /etc/dovecot/users: User joe is missing userdb info Aug 12 20:59:57 auth: Debug: passwd-file /etc/dovecot/users: Read 1 users Aug 12 20:59:57 auth: Debug: auth client connected (pid=15035) Aug 12 21:00:24 auth: Debug: client in: AUTH 1 PLAIN service=imap secured lip=::1 rip=::1 lport=143 rport=57586 resp=AGpvZQBmb29iYXI= Aug 12 21:00:24 auth: Debug: passwd-file(joe,::1): lookup: user=joe file=/etc/dovecot/users Aug 12 21:00:24 auth: Debug: client out: OK 1 user=joe Aug 12 21:00:24 auth: Debug: master in: REQUEST 1600520193 15035 1 444418a798323b1eb1dc21c4154719e0 Aug 12 21:00:24 auth: Debug: passwd-file(joe,::1): lookup: user=joe file=/etc/dovecot/users Aug 12 21:00:24 auth: Debug: master out: USER 1600520193 joe Aug 12 21:00:24 imap-login: Info: Login: user=<joe>, method=PLAIN, rip=::1, lip=::1, mpid=15048, secured Aug 12 21:00:24 imap(joe): Error: user joe: Couldn't drop privileges: User is missing UID (see mail_uid setting) Aug 12 21:00:24 imap(joe): Error: Internal error occurred. Refer to server log for more information.
/etc/dovecot/users is mode 0644 (for now)
-- David Griffith dave@661.org
On 13.8.2013, at 0.03, dave@661.org wrote:
On Mon, 12 Aug 2013, Timo Sirainen wrote:
On 12.8.2013, at 23.29, dave@661.org wrote:
What does Dovecot log when you're logging in? [snip] That's Postfix log, not Dovecot log.
Dovecot doesn't emit any logs when I go in through port 25.
Then I don't think Postfix is using Dovecot for authentication at all. With auth_debug=yes Dovecot will log debug messages about the authentication.
participants (2)
-
dave@661.org
-
Timo Sirainen