PDA

View Full Version : Dovecot weird error



g_wynn
08-14-2007, 04:23 AM
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]#

chatwizrd
08-14-2007, 10:31 AM
Dont you have to change your password in the password line to md5 and not just plain text?

skruf
08-14-2007, 11:55 AM
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

g_wynn
08-15-2007, 01:56 AM
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

g_wynn
08-15-2007, 01:58 AM
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?

smtalk
08-15-2007, 01:59 AM
Try:

cd /etc
rm -rf dovecot.conf
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

smtalk
08-15-2007, 02:15 AM
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
geoff:test:500:501 to:

geoff:$1$G/FqlOG5$Vj0xmc9fKY.UVr8OWr/7C1:500:12::/home/user/imap/domain.com/Maildir:/bin/false
I use 500:12, because 500 is user UID and 12 is mail GID.

g_wynn
08-15-2007, 02:41 AM
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
geoff:test:500:501 to:

geoff:$1$G/FqlOG5$Vj0xmc9fKY.UVr8OWr/7C1:500:12::/home/user/imap/domain.com/Maildir:/bin/false
I use 500:12, because 500 is user UID and 12 is mail GID.