|
2
|
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
2 |
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
3 |
<head>
|
|
|
4 |
<title>checkvpw - check passwords for virtual and non-virtual users</title>
|
|
|
5 |
<link rev="made" href="mailto:Gentoo@lorien.untroubled.org" />
|
|
|
6 |
</head>
|
|
0
|
7 |
|
|
2
|
8 |
<body style="background-color: white">
|
|
0
|
9 |
|
|
2
|
10 |
<p><a name="__index__"></a></p>
|
|
0
|
11 |
<!-- INDEX BEGIN -->
|
|
|
12 |
<!--
|
|
|
13 |
|
|
2
|
14 |
<ul>
|
|
0
|
15 |
|
|
2
|
16 |
<li><a href="#name">NAME</a></li>
|
|
|
17 |
<li><a href="#synopsis">SYNOPSIS</a></li>
|
|
|
18 |
<li><a href="#description">DESCRIPTION</a></li>
|
|
|
19 |
<li><a href="#return_value">RETURN VALUE</a></li>
|
|
|
20 |
<li><a href="#environment">ENVIRONMENT</a></li>
|
|
|
21 |
<li><a href="#see_also">SEE ALSO</a></li>
|
|
|
22 |
<li><a href="#author">AUTHOR</a></li>
|
|
|
23 |
</ul>
|
|
0
|
24 |
-->
|
|
|
25 |
<!-- INDEX END -->
|
|
|
26 |
|
|
2
|
27 |
<p>
|
|
|
28 |
</p>
|
|
|
29 |
<h1><a name="name">NAME</a></h1>
|
|
|
30 |
<p>checkvpw - check passwords for virtual and non-virtual users</p>
|
|
|
31 |
<p>
|
|
|
32 |
</p>
|
|
|
33 |
<hr />
|
|
|
34 |
<h1><a name="synopsis">SYNOPSIS</a></h1>
|
|
|
35 |
<p><strong>checkvpw</strong> <strong>subprogram</strong> [<strong>arguments...</strong>]</p>
|
|
|
36 |
<p>
|
|
|
37 |
</p>
|
|
|
38 |
<hr />
|
|
|
39 |
<h1><a name="description">DESCRIPTION</a></h1>
|
|
|
40 |
<p>This program is a drop-in replacement for the standard checkpassword,
|
|
|
41 |
written by D. J. Bernstein (<a href="mailto:djb@pobox.com">djb@pobox.com</a>)
|
|
|
42 |
In the absence of virtual hosting (determined by the use of
|
|
|
43 |
<em>/var/qmail/control/virtualdomainss</em> and IP aliases),
|
|
|
44 |
it behaves identically to checkpassword.
|
|
|
45 |
When virtual hosting is used, it permits logins from a unique set of
|
|
|
46 |
users for each of the aliases.</p>
|
|
|
47 |
<p><em>checkvpw</em> must be run from either the <em>tcp-env</em> program
|
|
|
48 |
(part of the <em>qmail</em>
|
|
|
49 |
package) or from a suitable substitute, such as <em>tcpserver</em>
|
|
|
50 |
(part of the <em>ucspi-tcp</em> package).
|
|
|
51 |
These packages are used to determine to
|
|
|
52 |
which address a remote host is connecting.
|
|
|
53 |
<em>checkvpw</em> must also be passed the checkpassword-compatible
|
|
|
54 |
authentication data on file descriptor three.
|
|
|
55 |
This can be accomplished by running it from a tool such as
|
|
|
56 |
<em>qmail-popup</em>.</p>
|
|
|
57 |
<p><em>checkvpw</em> accepts a command line in the following format:</p>
|
|
|
58 |
<pre>
|
|
|
59 |
checkvpw [subprogram] [arguments...]</pre>
|
|
|
60 |
<p>If the authentication information is valid, the subprogram is run,
|
|
|
61 |
otherwise <em>checkvpw</em> returns an error to the program that invokes it.</p>
|
|
|
62 |
<p>If the user name contains the character <code>@</code>, the host name
|
|
|
63 |
reported by <em>tcp-env</em> is replaced by the string following the
|
|
|
64 |
<code>@</code>, and the user name is replaced by the string preceding the
|
|
|
65 |
<code>@</code>.
|
|
|
66 |
If the local host name reported by <em>tcp-env</em> matches one of those
|
|
|
67 |
in <em>/var/qmail/control/virtualdomains</em>, <em>checkvpw</em> prepends the
|
|
|
68 |
<em>prepend</em> string associated with the host name to the given user
|
|
|
69 |
name.
|
|
|
70 |
Wildcards in <em>virtualdomains</em> are permitted and are handled in the
|
|
|
71 |
same way <em>qmail</em> handles them (see <em>qmail-send</em>).
|
|
|
72 |
For example, if the line <code>.bar.com:bar</code> appears in the virtual hosts
|
|
|
73 |
file, it matches <code>one.two.bar.com</code> but not <code>bar.com</code>.</p>
|
|
|
74 |
<p>If the user name resulting from the above step appears in the system
|
|
|
75 |
password file (typically <em>/etc/passwd</em>), the user is treated as a
|
|
|
76 |
local user and authenticated with the information from that file.
|
|
|
77 |
If this authentication succeeds, the mail directory is set to the
|
|
|
78 |
subdirectory named on the command line.
|
|
|
79 |
If the user name does not appear in the system password file and is of
|
|
|
80 |
the form <code>name-ext</code> where <code>name</code> does appear in the password
|
|
|
81 |
file, the user is treated as a ``virtual'' user and authenticated with the
|
|
|
82 |
information from a file named <em>passwd</em> in the user's home directory.
|
|
|
83 |
If this authentication succeeds, the mail directory is set to the
|
|
|
84 |
subdirectory <em>users/ext/</em> in the user's home directory, where
|
|
|
85 |
<code>ext</code> is from the above step.</p>
|
|
|
86 |
<p><em>checkvpw</em> also does some rewriting on the arguments of the
|
|
|
87 |
subprogram.
|
|
|
88 |
Any argument matching the string ``<code>maildir</code>'' (ignoring case) is
|
|
|
89 |
replaced with the full path of the mail directory, as determined by the
|
|
|
90 |
steps above.</p>
|
|
|
91 |
<p>This program may be invoked in combination with <em>qmail-popup</em> and
|
|
|
92 |
<em>qmail-pop3d</em> from inetd by placing the following line in the
|
|
|
93 |
<em>/etc/inetd.conf</em> configuration file (all one line):</p>
|
|
|
94 |
<pre>
|
|
|
95 |
pop-3 stream tcp nowait root /var/qmail/bin/tcp-env tcp-env -R /var/qmail/bin/qmail-popup <hostname> /usr/bin/checkvpw /var/qmail/bin/qmail-pop3d Maildir/</pre>
|
|
|
96 |
<p>
|
|
|
97 |
</p>
|
|
|
98 |
<hr />
|
|
|
99 |
<h1><a name="return_value">RETURN VALUE</a></h1>
|
|
|
100 |
<p>0 if the user is successfully authenticated, nonzero if any error
|
|
|
101 |
occurred. Exit code 1 indicates that a bad password was given, 2
|
|
|
102 |
indicates that the program was used incorrectly, and 111 indicates
|
|
|
103 |
a temporary failure.</p>
|
|
|
104 |
<p>
|
|
|
105 |
</p>
|
|
|
106 |
<hr />
|
|
|
107 |
<h1><a name="environment">ENVIRONMENT</a></h1>
|
|
|
108 |
<p><em>checkvpw</em> requires that <code>TCPLOCALHOST</code> be set to the host name of
|
|
|
109 |
the local address of the connection.</p>
|
|
|
110 |
<p>
|
|
|
111 |
</p>
|
|
|
112 |
<hr />
|
|
|
113 |
<h1><a name="see_also">SEE ALSO</a></h1>
|
|
|
114 |
<p><code>vdeliver(1)</code></p>
|
|
|
115 |
<p>
|
|
|
116 |
</p>
|
|
|
117 |
<hr />
|
|
|
118 |
<h1><a name="author">AUTHOR</a></h1>
|
|
|
119 |
<p>Bruce Guenter <<em><a href="mailto:bruceg@em.ca">bruceg@em.ca</a></em>>.</p>
|
|
0
|
120 |
|
|
2
|
121 |
</body>
|
|
0
|
122 |
|
|
2
|
123 |
</html>
|