[Dovecot] Problem using passwd-file authentication: does not read UID, GID
Joseph Tam
tam at math.ubc.ca
Wed Jan 12 03:28:38 EET 2005
There seems to be a problem when setting the default authentication method
to passwd-file when they use the same file (which they frequently do):
auth default {
mechanisms = plain
userdb = passwd-file /passwd
passdb = passwd-file /passwd
...
}
The log files show
dovecot: Jan 11 14:41:40 Info: Dovecot v1.0-test60 starting up
dovecot: Jan 11 14:41:49 Info: auth(default): userdb(test,127.0.0.1): uid=0 gid=0 home= mail=
dovecot: Jan 11 14:41:49 Error: Logins with UID 0 not permitted (user test)
dovecot: Jan 11 14:41:49 Info: imap-login: Internal login failure: test [127.0.0.1]
When userdb-passwd-file.c::passwd_file_init() is called, it compares the
userdb passwd-file to the passdb passwd-file. If they are the same, it resets
the time stamp to force a re-read of the password database during the next
look-up. However, I believe it also needs to reset the userdb_pwf->userdb
flag to TRUE or else it won't pick up the UID and GID and will use 0 instead:
/* resync */
userdb_pwf->userdb = TRUE; /* Was FALSE in v1.0-test60 */
userdb_pwf->stamp = 0;
Joseph Tam <tam at math.ubc.ca>
More information about the dovecot
mailing list