userdbpw.html.in
上传用户:s81996212
上传日期:2007-01-04
资源大小:722k
文件大小:4k
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
- "http://www.w3.org/TR/REC-html40/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html">
- <title>userdb - manipulate @userdb@</title>
- <!-- $Id: userdbpw.html.in,v 1.5 2000/03/06 17:41:12 mrsam Exp $ -->
- <!-- Copyright 1998 - 1999 Double Precision, Inc. See COPYING for -->
- <!-- distribution information. -->
- <!-- SECTION 8 -->
- </head>
- <body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B"
- alink="#FF0000">
- <h1>userdbpw - create an encrypted password</h1>
- <h2>SYNOPSIS</h2>
- <pre>userdbpw [ -md5 ] [ -hmac-md5 ] [ -hmac-sha1 ]
- | userdb <i>name</i> set <i>field</i></pre>
- <br>
- <h2>DESCRIPTION</h2>
- <p>The <code>userdbpw</code> utility helps you securely enter encrypted
- passwords into <code>@userdb@</code>.</p>
- <p><code>userdbpw</code> reads a single line of text on standard input,
- encrypts it, and prints the encrypted result on standard output.</p>
- <p>If standard input is attached to a terminal device, <code>userdbpw</code>
- explicitly issues a "Password: " prompt on standard error, and turns off echo
- while the password is entered.</p>
- <p>The <code>-md5</code> option is available on systems running Red Hat Linux
- 6.0 or higher. This option creates an MD5 password hash, instead of using the
- traditional crypt() function.</p>
- <p><code>-hmac-md5</code> and <code>-hmac-sha1</code> options are available
- only if the <code>userdb</code> library is installed alongside an application
- that uses a challenge/response authentication mechanism.
- <code>-hmac-md5</code> creates an intermediate HMAC context using the MD5 hash
- function. <code>-hmac-sha1</code> uses the SHA1 hash function instead. Whether
- either HMAC function is actually available depends on the actual application
- that installs the <code>userdb</code> library.</p>
- <p>Note that even though the result of HMAC hashing looks like an encrypted
- password, it's really not. HMAC-based challenge/response authentication
- mechanisms require the cleartext password to be available as cleartext.
- Computing an intermediate HMAC context does scramble the cleartext password,
- however if its compromised, it WILL be possible for an attacker to succesfully
- authenticate. Therefore, applications that use challenge/response
- authentication will store intermediate HMAC contexts in the "pw" fields in the
- userdb database, which will be compiled into the <code>userdbshadow.dat</code>
- database, which has group and world permissions turned off. The
- <code>userdb</code> library also requires that the cleartext
- <code>userdb</code> source for the <code>userdb.dat</code> and
- <code>userdbshadow.dat</code> databases is also stored with the group and
- world permissions turned off.</p>
- <p><code>userdbpw</code> is usually used together in a pipe with
- <code>userdb</code>, which reads from standard input. For example:<br>
- <br>
- </p>
- <pre>userdbpw -md5 | userdb users/john set systempw
- <br>
- </pre>
- <p>Or:<br>
- <br>
- </p>
- <pre>userdbpw -hmac-md5 | userdb users/john set imap-hmac-md5pw
- <br>
- </pre>
- <p>This command sets the <code>systempw</code> variable in the record for the
- user <i>john</i> in <code>@userdb@/users</code> file. Don't forget to run
- <code>makeuserdb</code> for the change to take effect.</p>
- <p>The following command does the same thing:<br>
- <br>
- </p>
- <pre>userdb users/john set systempw=<i>SECRETPASSWORD</i>
- <br>
- </pre>
- <p>However, this command passes the secret password as an argument to the
- <code>userdb</code> command, which can be viewed by anyone who happens to run
- ps(1) at the same time. Using <code>userdbpw</code> allows the secret password
- to be specified in a way that cannot be easily viewed by ps(1).</p>
- <h2>SEE ALSO</h2>
- <a href="userdb.html">userdb(8)</a>, <a
- href="makeuserdb.html">makeuserdb(8)</a></body>
- </html>