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