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