[Dovecot] [checkpassword] I can't get a password from fd3
Durk Strooisma
durk at kern.nl
Mon Jan 12 19:31:47 EET 2009
Hi all,
I'm trying to implement checkpassword authentication with a simple bash
script. In some way I can't get the password from file descriptor 3.
The start of script looks like this:
#!/bin/bash
read -d '\0' -r -u 3
USERNAME="${REPLY}"
read -d '\0' -r -u 3
PASSWORD="${REPLY}"
if [ -z "${USERNAME}" ] || [ -z "${PASSWORD}" ]
then
exit 111
fi
It always exits with 111, because PASSWORD is empty. In whatever way I try
to retrieve data from fd3, I never happen to get more data than the username.
Is this a known problem? Am I doing something silly? Replies are much
appreciated!
Durk
FYI: GSSAPI auth works perfect and PAM worked before switching to
checkpassword too.
OS version : Debian 5.0 lenny amd64
Dovecot version : 1.0.15 (Debian version 1.0.15-2.3)
Parts of /etc/dovecot/dovecot.conf:
protocols: imap
ssl_cert_file: /etc/ssl/certs/cert.pem
ssl_key_file: /etc/ssl/private/cert.key
ssl_cipher_list: ALL:!LOW:!SSLv2
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/imap-login
first_valid_uid: 998
last_valid_uid: 998
first_valid_gid: 998
last_valid_gid: 998
mail_privileged_group: mail
mail_location: maildir:/srv/vmail/%Ld/%n
lock_method: flock
maildir_copy_with_hardlinks: yes
auth default:
mechanisms: gssapi plain
krb5_keytab: /etc/dovecot/krb5.keytab
verbose: yes
debug: yes
passdb:
driver: checkpassword
args: /usr/bin/dovecot-checkpassword
userdb:
driver: ldap
args: /etc/dovecot/dovecot-ldap.conf
More information about the dovecot
mailing list