[Dovecot] Extra_fields / first check userdb?
Hi,
I would like to supply a few users with extra_fields. All users are found by PAM first so the userdb passwd-file doesnt seem to be used. How to alter the lookup sequence? We can't remove the accounts from the central passwd, just for Dovecot.
Thanks, Leroy
Leroy van Logchem wrote:
Hi,
I would like to supply a few users with extra_fields. All users are found by PAM first so the userdb passwd-file doesnt seem to be used. How to alter the lookup sequence? We can't remove the accounts from the central passwd, just for Dovecot.
Thanks, Leroy
You can have multiple authentication databases:-
passdb passwd-file { args = /etc/dovecot/special-users }
passdb pam { }
This works for us when we want to specify proxying, but presumably you'd need to have some form of password field in "special-users" otherwise.
For userdb, we use passwd-file anyway (PAM can't be a userdb) mainly to assign uids and gids (though these could be static, of course).
Best Wishes, Chris
-- --+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+- Christopher Wakelin, c.d.wakelin@reading.ac.uk IT Services Centre, The University of Reading, Tel: +44 (0)118 378 8439 Whiteknights, Reading, RG6 2AF, UK Fax: +44 (0)118 975 3094
I would like to supply a few users with extra_fields. All users are found by PAM first so the userdb passwd-file doesnt seem to be used. How to alter the lookup sequence? We can't remove the accounts from the central passwd, just for Dovecot.
Thanks, Leroy
You can have multiple authentication databases:-
passdb passwd-file { args = /etc/dovecot/special-users }
passdb pam { }
This works for us when we want to specify proxying, but presumably you'd need to have some form of password field in "special-users" otherwise.
Thanks for the pointer Chris. It works now, using: <snip> auth default { mechanisms = plain login passdb passwd-file { args = /drbd/imap/dovecot-1.0.rc15/etc/userdb_extra } passdb pam { } userdb passwd-file { args = /drbd/imap/dovecot-1.0.rc15/etc/userdb_extra } userdb passwd { } user = root } <snip>
Where the userdb_extra file contains entries like: username::2000:2000::/u/username::userdb_mail=mbox:/u/username/Mail:INBOX=/var/mail/%u
-- Leroy
participants (2)
-
Chris Wakelin
-
Leroy van Logchem