Command docs: replacables are in italics, options always start with a dash
[openssl.git] / doc / man1 / openssl-passwd.pod
1 =pod
2
3 =head1 NAME
4
5 openssl-passwd - compute password hashes
6
7 =head1 SYNOPSIS
8
9 B<openssl passwd>
10 [B<-help>]
11 [B<-crypt>]
12 [B<-1>]
13 [B<-apr1>]
14 [B<-aixmd5>]
15 [B<-5>]
16 [B<-6>]
17 [B<-salt> I<string>]
18 [B<-in> I<file>]
19 [B<-stdin>]
20 [B<-noverify>]
21 [B<-quiet>]
22 [B<-table>]
23 [B<-rand> I<files>]
24 [B<-writerand> I<file>]
25 {I<password>}
26
27 =for comment ifdef crypt
28
29 =head1 DESCRIPTION
30
31 The B<passwd> command computes the hash of a password typed at
32 run-time or the hash of each password in a list.  The password list is
33 taken from the named file for option B<-in>, from stdin for
34 option B<-stdin>, or from the command line, or from the terminal otherwise.
35 The Unix standard algorithm B<-crypt> and the MD5-based BSD password
36 algorithm B<-1>, its Apache variant B<-apr1>, and its AIX variant are
37 available.
38
39 =head1 OPTIONS
40
41 =over 4
42
43 =item B<-help>
44
45 Print out a usage message.
46
47 =item B<-crypt>
48
49 Use the B<crypt> algorithm (default).
50
51 =item B<-1>
52
53 Use the MD5 based BSD password algorithm B<1>.
54
55 =item B<-apr1>
56
57 Use the B<apr1> algorithm (Apache variant of the BSD algorithm).
58
59 =item B<-aixmd5>
60
61 Use the B<AIX MD5> algorithm (AIX variant of the BSD algorithm).
62
63 =item B<-5>
64
65 =item B<-6>
66
67 Use the B<SHA256> / B<SHA512> based algorithms defined by Ulrich Drepper.
68 See L<https://www.akkadia.org/drepper/SHA-crypt.txt>.
69
70 =item B<-salt> I<string>
71
72 Use the specified salt.
73 When reading a password from the terminal, this implies B<-noverify>.
74
75 =item B<-in> I<file>
76
77 Read passwords from I<file>.
78
79 =item B<-stdin>
80
81 Read passwords from B<stdin>.
82
83 =item B<-noverify>
84
85 Don't verify when reading a password from the terminal.
86
87 =item B<-quiet>
88
89 Don't output warnings when passwords given at the command line are truncated.
90
91 =item B<-table>
92
93 In the output list, prepend the cleartext password and a TAB character
94 to each password hash.
95
96 =item B<-rand> I<files>
97
98 The files containing random data used to seed the random number generator.
99 Multiple files can be specified separated by an OS-dependent character.
100 The separator is B<;> for MS-Windows, B<,> for OpenVMS, and B<:> for
101 all others.
102
103 =item B<-writerand> I<file>
104
105 Writes random data to the specified I<file> upon exit.
106 This can be used with a subsequent B<-rand> flag.
107
108 =back
109
110 =head1 EXAMPLES
111
112   % openssl passwd -crypt -salt xx password
113   xxj31ZMTZzkVA
114
115   % openssl passwd -1 -salt xxxxxxxx password
116   $1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a.
117
118   % openssl passwd -apr1 -salt xxxxxxxx password
119   $apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0
120
121   % openssl passwd -aixmd5 -salt xxxxxxxx password
122   xxxxxxxx$8Oaipk/GPKhC64w/YVeFD/
123
124 =head1 COPYRIGHT
125
126 Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
127
128 Licensed under the Apache License 2.0 (the "License").  You may not use
129 this file except in compliance with the License.  You can obtain a copy
130 in the file LICENSE in the source distribution or at
131 L<https://www.openssl.org/source/license.html>.
132
133 =cut