This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 1 and 2
Revision 1 as of 2006-05-12 23:15:15
Size: 1011
Editor: TimoSirainen
Comment:
Revision 2 as of 2006-11-05 14:23:27
Size: 1676
Editor: TimoSirainen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= passwd-file = = Passwd-file =
Line 3: Line 3:
This file is compatible with regular `/etc/passwd` and a password file used by libpam-pwdfile. It's in the following format: This file is compatible with a normal `/etc/passwd` file, and a password file used by libpam-pwdfile [PasswordDatabase/PAM PAM] plugin. It's in the following format:
Line 9: Line 9:
For password database, it's enough to have only user and password fields. For user database, you need to set also uid and gid and preferably home (see VirtualUsers).

extra_fields is a space-separated list of key=value pairs which can be used to set various settings, for example you can override default_mail_env setting by giving `mail=mbox:~/mail`.
For a password database it's enough to have only the user and password fields. For a user database, you need to set also uid, gid and preferably also home (see VirtualUsers). (gecos) and (shell) fields are unused by Dovecot.
Line 15: Line 13:
 * password: Assume CRYPT password scheme
 * password[type]: libpam-passwd file compatible format. Type is one of:
  * 13: CRYPT scheme
  * 34: MD5 scheme
 * {SCHEME}password
 * `password`: Assume CRYPT [wiki:Authentication/PasswordSchemes password scheme].
 * `{SCHEME}password`: The password is in the given [wiki:Authentication/PasswordSchemes scheme].
 * `password[13]`: libpam-passwd file compatible format for CRYPT [wiki:Authentication/PasswordSchemes scheme].
 * `password[34]`: libpam-passwd file compatible format for MD5 [wiki:Authentication/PasswordSchemes scheme].
Line 21: Line 18:
Here's an example file for used by passdb: extra_fields is a space-separated list of key=value pairs which can be used to set various [wiki:PasswordDatabase/ExtraFields passdb settings] and [wiki:UserDatabase/ExtraFields userdb settings]. Keys which begin with a `userdb_` prefix are used for userdb, others are used for passdb. So for example if you wish to override [wiki:MailLocation mail_location] setting for one user, use `userdb_mail=mbox:~/mail`.

== Examples ==

This file can be used as a passdb:
Line 24: Line 25:
user:{PLAIN}password user:{plain}password
user2:{plain}password2
Line 27: Line 29:
Or for passdb and userdb: This file can be used as both a passwd and a userdb:
Line 30: Line 32:
user:{plain}pass:1000:1000::/home/user::mail=maildir:~/Maildir allow_nets=192.168.0.0/24 user:{plain}pass:1000:1000::/home/user::userdb_mail=maildir:~/Maildir allow_nets=192.168.0.0/24
user2:{plain}pass2:1001:1001::/home/user2

Passwd-file

This file is compatible with a normal /etc/passwd file, and a password file used by libpam-pwdfile [PasswordDatabase/PAM PAM] plugin. It's in the following format:

user:password:uid:gid:(gecos):home:(shell):extra_fields

For a password database it's enough to have only the user and password fields. For a user database, you need to set also uid, gid and preferably also home (see VirtualUsers). (gecos) and (shell) fields are unused by Dovecot.

The password field can be in three formats:

  • password: Assume CRYPT [wiki:Authentication/PasswordSchemes password scheme].

  • {SCHEME}password: The password is in the given [wiki:Authentication/PasswordSchemes scheme].

  • password[13]: libpam-passwd file compatible format for CRYPT [wiki:Authentication/PasswordSchemes scheme].

  • password[34]: libpam-passwd file compatible format for MD5 [wiki:Authentication/PasswordSchemes scheme].

extra_fields is a space-separated list of key=value pairs which can be used to set various [wiki:PasswordDatabase/ExtraFields passdb settings] and [wiki:UserDatabase/ExtraFields userdb settings]. Keys which begin with a userdb_ prefix are used for userdb, others are used for passdb. So for example if you wish to override [wiki:MailLocation mail_location] setting for one user, use userdb_mail=mbox:~/mail.

Examples

This file can be used as a passdb:

user:{plain}password
user2:{plain}password2

This file can be used as both a passwd and a userdb:

user:{plain}pass:1000:1000::/home/user::userdb_mail=maildir:~/Maildir allow_nets=192.168.0.0/24
user2:{plain}pass2:1001:1001::/home/user2

None: AuthDatabase/PasswdFile (last edited 2019-09-11 14:15:57 by MichaelSlusarz)