Dovecot weird error

g_wynn

New member
Joined
Aug 14, 2007
Messages
4
Hello, here is the thing. I set up a passwd.dovecot file in /etc with the username of geoff and password of test as follows:

geoff:test:500:501

When I try to telnet from the localhost it says "NO Authentication failed."
buy the username and password match as I have all debugging on! It makes no sense to me... Can anyone please help?!! Output is below. The CRYPT command seems to say CRYPT(test) != 'test' which means the darn password IS test!! I have spent hours on this it is driving me crazy!!:eek:

[root@cartman log]# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK Dovecot ready.
1 login geoff test
1 NO Authentication failed.

Aug 14 21:08:48 cartman dovecot: auth(default): client in: AUTH 1 PLAIN service=IMAP secured lip=::ffff:127.0.0.1 rip=::ffff:127.0.0.1 resp=AGdlb2ZmAHRlc3Q=
Aug 14 21:08:48 cartman dovecot: auth(default): passwd-file(geoff,::ffff:127.0.0.1): lookup: user=geoff file=/etc/passwd.dovecot
Aug 14 21:08:48 cartman dovecot: auth(default): passwd-file(geoff,::ffff:127.0.0.1): Password mismatch
Aug 14 21:08:48 cartman dovecot: auth(default): passwd-file(geoff,::ffff:127.0.0.1): CRYPT(test) != 'test'
Aug 14 21:08:49 cartman dovecot: auth(default): client out: FAIL 1 user=geoff
Aug 14 21:08:52 cartman dovecot: imap-login: Disconnected: Too many invalid commands: user=<geoff>, method=PLAIN, rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured
[root@cartman log]#

[root@cartman log]# dovecot -n
# /etc/dovecot.conf
disable_plaintext_auth: yes
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/imap
mail_plugin_dir(imap): /usr/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/pop3
auth default:
verbose: yes
debug: yes
debug_passwords: yes
passdb:
driver: passwd-file
args: /etc/passwd.dovecot
userdb:
driver: passwd-file
args: /etc/passwd.dovecot
[root@cartman log]#
 
Dont you have to change your password in the password line to md5 and not just plain text?
 
Hey,

Just a wild guess but...

[root@cartman log]# dovecot -n
# /etc/dovecot.conf
disable_plaintext_auth: yes

In your dovecot.conf, should probably be:

disable_plaintext_auth = no

David
 
Last edited:
Dovecot Weird Error

David, thanks for that, you are correct but... I changed it to that after failing the other way, i was hoping for a better error message. I have put it back to
disable_plaintext_auth = no but it still does the same thing.....


Hey,

Just a wild guess but...



In your dovecot.conf, should probably be:

disable_plaintext_auth = no

David
 
Dovecot Weird Error

Hey, not where where you mean? In the dovecot.conf file? Or in the passwd.dovecot file?

Cheers,

Geoff

Dont you have to change your password in the password line to md5 and not just plain text?
 
Try:
Code:
cd /etc[FONT=monospace]
[/FONT]rm -rf dovecot.conf[FONT=monospace]
[/FONT]wget http://files.directadmin.com/services/custombuild/dovecot.conf
service dovecot restart (for RedHat based OS)

With a new config you'll have a password file located here: /etc/virtual/domain/passwd
 
Last edited:
Ah, now I see where you did a mistake. You need to convert your password to a hash, so, test would be: $1$G/FqlOG5$Vj0xmc9fKY.UVr8OWr/7C1

And, you need to change
Code:
 geoff:test:500:501
to:
Code:
geoff:$1$G/FqlOG5$Vj0xmc9fKY.UVr8OWr/7C1:500:12::/home/[B]user[/B]/imap/[B]domain.com[/B]/[B]Maildir[/B]:/bin/false
I use 500:12, because 500 is user UID and 12 is mail GID.
 
Last edited:
Weird Dovecot Error

Hello, many thanks, I will try it now. However, how do I hash a password (or word)??

Geoff


Ah, now I see where you did a mistake. You need to convert your password to a hash, so, test would be: $1$G/FqlOG5$Vj0xmc9fKY.UVr8OWr/7C1

And, you need to change
Code:
 geoff:test:500:501
to:
Code:
geoff:$1$G/FqlOG5$Vj0xmc9fKY.UVr8OWr/7C1:500:12::/home/[B]user[/B]/imap/[B]domain.com[/B]/[B]Maildir[/B]:/bin/false
I use 500:12, because 500 is user UID and 12 is mail GID.
 
Back
Top