This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 4 and 29 (spanning 25 versions)
Revision 4 as of 2007-03-18 19:07:37
Size: 2112
Editor: TimoSirainen
Revision 29 as of 2019-09-11 14:15:57
Size: 83
Comment: Moved to new doc
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Passwd-file =

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


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`.

== Multiple passwd files ==

You can use all the [:Variables:variables] in the passwd-file filenames, for example:

passdb passwd-file {
  # Each domain has a separate passwd-file:
  args = /etc/auth/%d/passwd

If the filename contains %d, the usernames in the passwd file are expected to contain only the user, not the domain. If you want to use full "user@domain" usernames in the file, use %0.d instead.

== Examples ==

This file can be used as a passdb:


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=
Moved to

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