]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man1/openssl-passwd.pod.in
Apps: change provider_path option to provider-path.
[thirdparty/openssl.git] / doc / man1 / openssl-passwd.pod.in
CommitLineData
bb325c7d 1=pod
625c781d 2{- OpenSSL::safe::output_do_not_edit_headers(); -}
9fcb9702 3
bb325c7d
BM
4=head1 NAME
5
b6b66573 6openssl-passwd - compute password hashes
bb325c7d
BM
7
8=head1 SYNOPSIS
9
10B<openssl passwd>
169394d4 11[B<-help>]
bb325c7d 12[B<-crypt>]
cc244b37 13[B<-1>]
e6e7b5f3 14[B<-apr1>]
037f2c3f 15[B<-aixmd5>]
2e04d6cc
RL
16[B<-5>]
17[B<-6>]
ad860603
BM
18[B<-salt> I<string>]
19[B<-in> I<file>]
e6e7b5f3 20[B<-stdin>]
db70a3fd 21[B<-noverify>]
bb325c7d
BM
22[B<-quiet>]
23[B<-table>]
65718c51 24[B<-reverse>]
9fcb9702 25{- $OpenSSL::safe::opt_r_synopsis -}
6bd4e3f2 26{- $OpenSSL::safe::opt_provider_synopsis -}
92de469f 27[I<password>]
bb325c7d 28
9f3c076b 29=for openssl ifdef crypt
1738c0ce 30
bb325c7d
BM
31=head1 DESCRIPTION
32
35a810bb 33This command computes the hash of a password typed at
e6e7b5f3 34run-time or the hash of each password in a list. The password list is
e8769719 35taken from the named file for option B<-in>, from stdin for
db70a3fd 36option B<-stdin>, or from the command line, or from the terminal otherwise.
2f0ea936
RL
37The Unix standard algorithm B<-crypt> and the MD5-based BSD password
38algorithm B<-1>, its Apache variant B<-apr1>, and its AIX variant are
39available.
bb325c7d
BM
40
41=head1 OPTIONS
42
43=over 4
44
169394d4
MR
45=item B<-help>
46
47Print out a usage message.
48
bb325c7d
BM
49=item B<-crypt>
50
51Use the B<crypt> algorithm (default).
52
cc244b37
BM
53=item B<-1>
54
55Use the MD5 based BSD password algorithm B<1>.
56
e6e7b5f3
BM
57=item B<-apr1>
58
cc244b37 59Use the B<apr1> algorithm (Apache variant of the BSD algorithm).
e6e7b5f3 60
037f2c3f
GN
61=item B<-aixmd5>
62
63Use the B<AIX MD5> algorithm (AIX variant of the BSD algorithm).
64
2e04d6cc
RL
65=item B<-5>
66
67=item B<-6>
68
69Use the B<SHA256> / B<SHA512> based algorithms defined by Ulrich Drepper.
70See L<https://www.akkadia.org/drepper/SHA-crypt.txt>.
71
ad860603 72=item B<-salt> I<string>
bb325c7d
BM
73
74Use the specified salt.
db70a3fd 75When reading a password from the terminal, this implies B<-noverify>.
bb325c7d 76
ad860603 77=item B<-in> I<file>
e6e7b5f3 78
ad860603 79Read passwords from I<file>.
e6e7b5f3
BM
80
81=item B<-stdin>
82
83Read passwords from B<stdin>.
84
db70a3fd
BM
85=item B<-noverify>
86
87Don't verify when reading a password from the terminal.
88
bb325c7d
BM
89=item B<-quiet>
90
e6e7b5f3 91Don't output warnings when passwords given at the command line are truncated.
bb325c7d
BM
92
93=item B<-table>
94
95In the output list, prepend the cleartext password and a TAB character
96to each password hash.
97
65718c51
RS
98=item B<-reverse>
99
100When the B<-table> option is used, reverse the order of cleartext and hash.
101
9fcb9702 102{- $OpenSSL::safe::opt_r_item -}
3ee1eac2 103
6bd4e3f2
P
104{- $OpenSSL::safe::opt_provider_item -}
105
bb325c7d
BM
106=back
107
ad860603 108=head1 EXAMPLES
bb325c7d 109
dfee8626
RS
110 % openssl passwd -crypt -salt xx password
111 xxj31ZMTZzkVA
e6e7b5f3 112
dfee8626
RS
113 % openssl passwd -1 -salt xxxxxxxx password
114 $1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a.
cc244b37 115
dfee8626
RS
116 % openssl passwd -apr1 -salt xxxxxxxx password
117 $apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0
bb325c7d 118
dfee8626
RS
119 % openssl passwd -aixmd5 -salt xxxxxxxx password
120 xxxxxxxx$8Oaipk/GPKhC64w/YVeFD/
037f2c3f 121
e2f92610
RS
122=head1 COPYRIGHT
123
33388b44 124Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 125
449040b4 126Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
127this file except in compliance with the License. You can obtain a copy
128in the file LICENSE in the source distribution or at
129L<https://www.openssl.org/source/license.html>.
130
131=cut