8e1f6f2de73e3132a26d32703945b78a9bde22b0
[openssl.git] / doc / man1 / openssl-passwd.pod.in
1 =pod
2 {- OpenSSL::safe::output_do_not_edit_headers(); -}
3
4 =head1 NAME
5
6 openssl-passwd - compute password hashes
7
8 =head1 SYNOPSIS
9
10 B<openssl passwd>
11 [B<-help>]
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<-reverse>]
24 {- $OpenSSL::safe::opt_r_synopsis -}
25 {- $OpenSSL::safe::opt_provider_synopsis -}
26 [I<password>]
27
28 =for openssl ifdef crypt
29
30 =head1 DESCRIPTION
31
32 This command computes the hash of a password typed at
33 run-time or the hash of each password in a list.  The password list is
34 taken from the named file for option B<-in>, from stdin for
35 option B<-stdin>, or from the command line, or from the terminal otherwise.
36 The MD5-based BSD password algorithm B<-1>, its Apache variant B<-apr1>,
37 and its AIX variant are 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<-1>
48
49 Use the MD5 based BSD password algorithm B<1> (default).
50
51 =item B<-apr1>
52
53 Use the B<apr1> algorithm (Apache variant of the BSD algorithm).
54
55 =item B<-aixmd5>
56
57 Use the B<AIX MD5> algorithm (AIX variant of the BSD algorithm).
58
59 =item B<-5>
60
61 =item B<-6>
62
63 Use the B<SHA256> / B<SHA512> based algorithms defined by Ulrich Drepper.
64 See L<https://www.akkadia.org/drepper/SHA-crypt.txt>.
65
66 =item B<-salt> I<string>
67
68 Use the specified salt.
69 When reading a password from the terminal, this implies B<-noverify>.
70
71 =item B<-in> I<file>
72
73 Read passwords from I<file>.
74
75 =item B<-stdin>
76
77 Read passwords from B<stdin>.
78
79 =item B<-noverify>
80
81 Don't verify when reading a password from the terminal.
82
83 =item B<-quiet>
84
85 Don't output warnings when passwords given at the command line are truncated.
86
87 =item B<-table>
88
89 In the output list, prepend the cleartext password and a TAB character
90 to each password hash.
91
92 =item B<-reverse>
93
94 When the B<-table> option is used, reverse the order of cleartext and hash.
95
96 {- $OpenSSL::safe::opt_r_item -}
97
98 {- $OpenSSL::safe::opt_provider_item -}
99
100 =back
101
102 =head1 EXAMPLES
103
104   % openssl passwd -1 -salt xxxxxxxx password
105   $1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a.
106
107   % openssl passwd -apr1 -salt xxxxxxxx password
108   $apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0
109
110   % openssl passwd -aixmd5 -salt xxxxxxxx password
111   xxxxxxxx$8Oaipk/GPKhC64w/YVeFD/
112
113 =head1 HISTORY
114
115 The B<-crypt> option was removed in OpenSSL 3.0.
116
117 =head1 COPYRIGHT
118
119 Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
120
121 Licensed under the Apache License 2.0 (the "License").  You may not use
122 this file except in compliance with the License.  You can obtain a copy
123 in the file LICENSE in the source distribution or at
124 L<https://www.openssl.org/source/license.html>.
125
126 =cut