xref: /onnv-gate/usr/src/common/openssl/doc/apps/passwd.pod (revision 2175:b0b2f052a486)
1*2175Sjp161948=pod
2*2175Sjp161948
3*2175Sjp161948=head1 NAME
4*2175Sjp161948
5*2175Sjp161948passwd - compute password hashes
6*2175Sjp161948
7*2175Sjp161948=head1 SYNOPSIS
8*2175Sjp161948
9*2175Sjp161948B<openssl passwd>
10*2175Sjp161948[B<-crypt>]
11*2175Sjp161948[B<-1>]
12*2175Sjp161948[B<-apr1>]
13*2175Sjp161948[B<-salt> I<string>]
14*2175Sjp161948[B<-in> I<file>]
15*2175Sjp161948[B<-stdin>]
16*2175Sjp161948[B<-noverify>]
17*2175Sjp161948[B<-quiet>]
18*2175Sjp161948[B<-table>]
19*2175Sjp161948{I<password>}
20*2175Sjp161948
21*2175Sjp161948=head1 DESCRIPTION
22*2175Sjp161948
23*2175Sjp161948The B<passwd> command computes the hash of a password typed at
24*2175Sjp161948run-time or the hash of each password in a list.  The password list is
25*2175Sjp161948taken from the named file for option B<-in file>, from stdin for
26*2175Sjp161948option B<-stdin>, or from the command line, or from the terminal otherwise.
27*2175Sjp161948The Unix standard algorithm B<crypt> and the MD5-based BSD password
28*2175Sjp161948algorithm B<1> and its Apache variant B<apr1> are available.
29*2175Sjp161948
30*2175Sjp161948=head1 OPTIONS
31*2175Sjp161948
32*2175Sjp161948=over 4
33*2175Sjp161948
34*2175Sjp161948=item B<-crypt>
35*2175Sjp161948
36*2175Sjp161948Use the B<crypt> algorithm (default).
37*2175Sjp161948
38*2175Sjp161948=item B<-1>
39*2175Sjp161948
40*2175Sjp161948Use the MD5 based BSD password algorithm B<1>.
41*2175Sjp161948
42*2175Sjp161948=item B<-apr1>
43*2175Sjp161948
44*2175Sjp161948Use the B<apr1> algorithm (Apache variant of the BSD algorithm).
45*2175Sjp161948
46*2175Sjp161948=item B<-salt> I<string>
47*2175Sjp161948
48*2175Sjp161948Use the specified salt.
49*2175Sjp161948When reading a password from the terminal, this implies B<-noverify>.
50*2175Sjp161948
51*2175Sjp161948=item B<-in> I<file>
52*2175Sjp161948
53*2175Sjp161948Read passwords from I<file>.
54*2175Sjp161948
55*2175Sjp161948=item B<-stdin>
56*2175Sjp161948
57*2175Sjp161948Read passwords from B<stdin>.
58*2175Sjp161948
59*2175Sjp161948=item B<-noverify>
60*2175Sjp161948
61*2175Sjp161948Don't verify when reading a password from the terminal.
62*2175Sjp161948
63*2175Sjp161948=item B<-quiet>
64*2175Sjp161948
65*2175Sjp161948Don't output warnings when passwords given at the command line are truncated.
66*2175Sjp161948
67*2175Sjp161948=item B<-table>
68*2175Sjp161948
69*2175Sjp161948In the output list, prepend the cleartext password and a TAB character
70*2175Sjp161948to each password hash.
71*2175Sjp161948
72*2175Sjp161948=back
73*2175Sjp161948
74*2175Sjp161948=head1 EXAMPLES
75*2175Sjp161948
76*2175Sjp161948B<openssl passwd -crypt -salt xx password> prints B<xxj31ZMTZzkVA>.
77*2175Sjp161948
78*2175Sjp161948B<openssl passwd -1 -salt xxxxxxxx password> prints B<$1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a.>.
79*2175Sjp161948
80*2175Sjp161948B<openssl passwd -apr1 -salt xxxxxxxx password> prints B<$apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0>.
81*2175Sjp161948
82*2175Sjp161948=cut
83