/usr/share/doc/lprng-doc/LPRng-Reference-Multipart/x9572.htm is in lprng-doc 3.8.A~rc2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org">
<title>Using MD5 for Authentication</title>
<meta name="GENERATOR" content=
"Modular DocBook HTML Stylesheet Version 1.79">
<link rel="HOME" title=" LPRng Reference Manual" href=
"index.htm">
<link rel="UP" title="Permissions and Authentication " href=
"permsref.htm">
<link rel="PREVIOUS" title="Using SSL for Authentication" href=
"x9495.htm">
<link rel="NEXT" title="Adding Authentication Support" href=
"x9639.htm">
</head>
<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#840084" alink="#0000FF">
<div class="NAVHEADER">
<table summary="Header navigation table" width="100%" border=
"0" cellpadding="0" cellspacing="0">
<tr>
<th colspan="3" align="center">LPRng Reference Manual: 24
Sep 2004 (For LPRng-3.8.28)</th>
</tr>
<tr>
<td width="10%" align="left" valign="bottom"><a href=
"x9495.htm" accesskey="P">Prev</a></td>
<td width="80%" align="center" valign="bottom">Chapter 17.
Permissions and Authentication</td>
<td width="10%" align="right" valign="bottom"><a href=
"x9639.htm" accesskey="N">Next</a></td>
</tr>
</table>
<hr align="left" width="100%">
</div>
<div class="SECT1">
<h1 class="SECT1"><a name="AEN9572" id="AEN9572">17.16. Using
MD5 for Authentication</a></h1>
<p><b class="APPLICATION">LPRng</b> has built-in support for
using MD5 digests as an authentication method. The
implementation is provided as an example of how to add user
level authentication into the <b class="APPLICATION">LPRng</b>
system.</p>
<p>The method used to do authentication is very simple. Each
user has a file containing a set of keys that are used to salt
an md5 hash. The information being transferred has its md5
checksum calculated using this salt, and is then transferred to
the destination, along with the md5 hash result. At the
destination the server will get the user id, obtain the salt
value from a key file, and then calculate the md5 hash value.
If the two are in agreement, authentication is successful.</p>
<p>The keyfile used for md5 authentication contains an id
followed by a text string whose binary value is used as a hash
key:</p>
<div class="INFORMALEXAMPLE">
<a name="AEN9579" id="AEN9579"></a>
<pre class="SCREEN">
id1=key
id2=key
Example:
lpr@h2=tadf79asd%^1asdf
lpr@h1=fdfa%$^&^%$
</pre>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="AEN9581" id="AEN9581">17.16.1.
Printcap Entries</a></h2>
<p>Options used:</p>
<ul>
<li>
<p><tt class="LITERAL">auth=md5</tt><span class=
"emphasis"><i class="EMPHASIS">use MD5
authentication</i></span></p>
</li>
<li>
<p><tt class="LITERAL">auth_forward=md5</tt><span class=
"emphasis"><i class="EMPHASIS">forward using MD5
authentication</i></span></p>
</li>
<li>
<p><tt class="LITERAL">md5_id=</tt><span class=
"emphasis"><i class="EMPHASIS">id for
server</i></span></p>
</li>
<li>
<p><tt class="LITERAL">md5_forward_id=</tt><span class=
"emphasis"><i class="EMPHASIS">id for
server</i></span></p>
</li>
<li>
<p><tt class=
"LITERAL">md5_server_keyfile=</tt><span class=
"emphasis"><i class="EMPHASIS">server
keyfile</i></span></p>
</li>
</ul>
<p>Example printcap entry:</p>
<div class="INFORMALEXAMPLE">
<a name="AEN9606" id="AEN9606"></a>
<pre class="SCREEN">
pr:
:lp=pr@wayoff
:auth=md5
:md5_id=lpr@wayoff.com
pr:server
:auth_forward=md5
:md5_id=lpr@wayoff.com
:md5_server_keyfile
:md5_forward_id=lpr@faroff.com
</pre>
</div>
<p>The <tt class="LITERAL">md5_id</tt> value is used by the
client to obtain a hash key that is used to salt the md5
calculation for client to server transfers. The <tt class=
"LITERAL">md5_forward_id</tt> value is used by the server to
obtain a hash key that is used to salt the md5 calculation
for server to server transfers.</p>
<p>The <tt class="LITERAL">md5_server_keyfile</tt> contains
the keys of users; the id sent as the connection information
is used to obtain the key from the file.</p>
<p>To set up md5 authentication, all that is needed is the
following.</p>
<ul>
<li>
<p>For each user generate a key and place it in the
server keyfile. This file should have the form:</p>
<div class="INFORMALEXAMPLE">
<a name="AEN9617" id="AEN9617"></a>
<pre class="SCREEN">
user1@host1=asdfasdfadf
user2@host2=a8789087asddasdf
</pre>
</div>
</li>
<li>
<p>Assign a key to the server, and set its printcap entry
to this key.</p>
<div class="INFORMALEXAMPLE">
<a name="AEN9621" id="AEN9621"></a>
<pre class="SCREEN">
pr:
:lp=pr@wayoff
:auth=md5
:md5_id=lpr@wayoff.com
</pre>
</div>
</li>
<li>
<p>For each user, create a user key file with the
following format:</p>
<div class="INFORMALEXAMPLE">
<a name="AEN9625" id="AEN9625"></a>
<pre class="SCREEN">
lpr@wayoff = user1@host1 asdfasdfadf
</pre>
</div>The first entry corresponds to the <tt class=
"LITERAL">md5_id</tt> value in the printcap. The second
field is the <acronym class="ACRONYM">AUTHUSER</acronym>
value supplied to the server and which will be used to
look up the key in the servers key file. Finally, the
last field is the salt value for the md5 calculation.
</li>
</ul>
</div>
<div class="SECT2">
<h2 class="SECT2"><a name="AEN9629" id="AEN9629">17.16.2.
User Environment Variables and Files</a></h2>
<p>Options used:</p>
<ul>
<li>
<p><tt class="LITERAL">MD5KEYFILE=5</tt><span class=
"emphasis"><i class="EMPHASIS">location of user
keyfile</i></span></p>
</li>
</ul>
<p>The <tt class="LITERAL">MD5KEYFILE</tt> environment
variable contains the path to the user keytab file.</p>
</div>
</div>
<div class="NAVFOOTER">
<hr align="left" width="100%">
<table summary="Footer navigation table" width="100%" border=
"0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href=
"x9495.htm" accesskey="P">Prev</a></td>
<td width="34%" align="center" valign="top"><a href=
"index.htm" accesskey="H">Home</a></td>
<td width="33%" align="right" valign="top"><a href=
"x9639.htm" accesskey="N">Next</a></td>
</tr>
<tr>
<td width="33%" align="left" valign="top">Using SSL for
Authentication</td>
<td width="34%" align="center" valign="top"><a href=
"permsref.htm" accesskey="U">Up</a></td>
<td width="33%" align="right" valign="top">Adding
Authentication Support</td>
</tr>
</table>
</div>
<p align="center"></p>
</body>
</html>
|