Joseph Tam
2005-Jan-12 01:28 UTC
[Dovecot] Problem using passwd-file authentication: does not read UID, GID
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>
Timo Sirainen
2005-Jan-30 09:04 UTC
[Dovecot] Problem using passwd-file authentication: does not read UID, GID
On 12.1.2005, at 03:28, Joseph Tam wrote:> 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:Fixed, thanks. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20050130/d8ab659a/attachment-0001.bin>