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