2 .\" <!-- Copyright 1998 - 2007 Double Precision, Inc. See COPYING for -->
3 .\" <!-- distribution information. -->
5 .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
6 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
8 .\" Manual: Double Precision, Inc.
9 .\" Source: Double Precision, Inc.
12 .TH "USERDBPW" "8" "09/08/2017" "Double Precision, Inc." "Double Precision, Inc."
13 .\" -----------------------------------------------------------------
14 .\" * Define some portability stuff
15 .\" -----------------------------------------------------------------
16 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17 .\" http://bugs.debian.org/507673
18 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
19 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 .\" -----------------------------------------------------------------
23 .\" * set default formatting
24 .\" -----------------------------------------------------------------
25 .\" disable hyphenation
27 .\" disable justification (adjust text to left margin only)
29 .\" -----------------------------------------------------------------
30 .\" * MAIN CONTENT STARTS HERE *
31 .\" -----------------------------------------------------------------
33 userdbpw \- create an encrypted password
35 .HP \w'\fBuserdbpw\fR\fBuserdb\fR\ 'u
36 \fBuserdbpw\fR [[\-md5] | [\-hmac\-md5] | [\-hmac\-sha1]] |\fBuserdb\fR {\fIname\fR} set {\fIfield\fR}
40 enables secure entry of encrypted passwords into
44 reads a single line of text on standard input, encrypts it, and prints the encrypted result to standard output\&.
46 If standard input is attached to a terminal device,
48 explicitly issues a "Password: " prompt on standard error, and turns off echo while the password is entered\&.
52 option is available on systems that use MD5\-hashed passwords (such as systems that use the current version of the PAM library for authenticating, with MD5 passwords enabled)\&. This option creates an MD5 password hash, instead of using the traditional
59 options are available only if the userdb library is installed by an application that uses a challenge/response authentication mechanism\&.
61 creates an intermediate HMAC context using the MD5 hash function\&.
63 uses the SHA1 hash function instead\&. Whether either HMAC function is actually available depends on the actual application that installs the
67 Note that even though the result of HMAC hashing looks like an encrypted password, it\*(Aqs 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
69 database, which has group and world permissions turned off\&. The userdb library also requires that the cleartext userdb source for the
73 databases is also stored with the group and world permissions turned off\&.
76 is usually used together in a pipe with
77 \fBuserdb\fR, which reads from standard input\&. For example:
83 \fBuserdbpw \-md5 | userdb users/john set systempw\fR
95 \fBuserdbpw \-hmac\-md5 | userdb users/john set hmac\-md5pw\fR
101 These commands set the
103 field in the record for the user
109 field\&. Don\*(Aqt forget to run
111 for the change to take effect\&.
113 The following command does the same thing:
119 \fBuserdb users/john set systempw=\fR\fB\fBSECRETPASSWORD\fR\fR
125 However, this command passes the secret password as an argument to the
127 command, which can be viewed by anyone who happens to run
129 at the same time\&. Using
131 allows the secret password to be specified in a way that cannot be easily viewed by
135 \m[blue]\fB\fBuserdb\fR(8)\fR\m[]\&\s-2\u[1]\d\s+2,
136 \m[blue]\fB\fBmakeuserdb\fR(8)\fR\m[]\&\s-2\u[2]\d\s+2
141 \%[set $man.base.url.for.relative.links]/userdb.html
146 \%[set $man.base.url.for.relative.links]/makeuserdb.html