"SfR Fresh" - the SfR Freeware/Shareware Archive 
Member "dovecot-1.0.15/doc/wiki/AuthDatabase.PasswdFile.txt" of archive dovecot-1.0.15.tar.gz:
As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers.
Alternatively you can here view or download the uninterpreted source code file.
That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
1
2
3 Passwd-file
4 ===========
5
6
7 This file is compatible with a normal '/etc/passwd' file, and a password file used by libpam-pwdfile >>PAM<< plugin. It's in the following format:
8
9 ---%<-------------------------------------------------------------------------
10 user:password:uid:gid:(gecos):home:(shell):extra_fields
11 ---%<-------------------------------------------------------------------------
12
13 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.
14 The password field can be in four formats:
15
16 * 'password': Assume CRYPT >>password scheme<<.
17 * '{SCHEME}password': The password is in the given >>scheme<<.
18 * 'password[13]': libpam-passwd file compatible format for CRYPT >>scheme<<.
19 * 'password[34]': libpam-passwd file compatible format for MD5 >>scheme<<.
20 extra_fields is a space-separated list of key=value pairs which can be used to set various >>passdb settings<< and >>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 >>mail_location<< setting for one user, use 'userdb_mail=mbox:~/mail'.
21
22
23 Multiple passwd files
24 =====================
25
26
27 You can use all the >>variables<< in the passwd-file filenames, for example:
28
29 ---%<-------------------------------------------------------------------------
30 passdb passwd-file {
31 # Each domain has a separate passwd-file:
32 args = /etc/auth/%d/passwd
33 }
34 ---%<-------------------------------------------------------------------------
35
36 *v1.0 only*: 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. For v1.1, see below.
37
38
39 Parameters
40 ==========
41
42
43 These are available *only with v1.1* and later:
44
45 * *scheme=<s>*: Allows you to specify the default password scheme. The default is CRYPT. This is available only for passdb.
46 * *username_format=<s>*: Look up usernames using this format instead of the full username ('%u'). If you want to enable user@domain logins but have only "user" in the file, set this to '%n'.
47 For example:
48
49 ---%<-------------------------------------------------------------------------
50 passdb passwd-file {
51 args = scheme=plain-md5 username_format=%n /etc/imap.passwd
52 }
53 userdb passwd-file {
54 args = username_format=%n /etc/imap.passwd
55 }
56 ---%<-------------------------------------------------------------------------
57
58
59
60 Examples
61 ========
62
63
64 This file can be used as a passdb:
65
66 ---%<-------------------------------------------------------------------------
67 user:{plain}password
68 user2:{plain}password2
69 ---%<-------------------------------------------------------------------------
70
71 This file can be used as both a passwd and a userdb:
72
73 ---%<-------------------------------------------------------------------------
74 user:{plain}pass:1000:1000::/home/user::userdb_mail=maildir:~/Maildir allow_nets=192.168.0.0/24
75 user2:{plain}pass2:1001:1001::/home/user2
76 ---%<-------------------------------------------------------------------------
77
78 (This file was created from the wiki on 2007-12-11 04:42)