summaryrefslogtreecommitdiff
path: root/mkpasswd.1
blob: 21555ad042df764fafa3509c78c7d2db4f28143c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.TH MKPASSWD 1 "21 March 2008" "Marco d'Itri" "Debian GNU/Linux"
.SH NAME
mkpasswd \- Overfeatured front end to crypt(3)
.SH SYNOPSIS
.B mkpasswd
.BR PASSWORD
.BR SALT
.PP
.SH DESCRIPTION
.B mkpasswd
encrypts the given password with the
.BR crypt(3)
libc function using the given salt.
.SH OPTIONS
.TP
.B -S, --salt=STRING
Use the \fISTRING\fP as salt. It must not contain prefixes such as \fI$1$\fP.
.TP
.B -R, --rounds=NUMBER
Use \fINUMBER\fP rounds. This argument is ignored if the method chosen
does not support variable rounds. For the OpenBSD Blowfish method this is
the logarithm of the number of rounds.
The behavior is undefined if this option is used without \fI--method\fP.
.TP
.B -m, --method=TYPE
Compute the password using the \fITYPE\fP method.
If \fITYPE\fP is \fIhelp\fP then the available methods are printed.
If \fITYPE\fP begins and end with \fI$\fP characters then the string
is passed to \fIcrypt_gensalt(3)\fP as-is.
.TP
.B -5
Like \fI--method=md5\fP.
.TP
.B -P, --password-fd=NUM
Read the password from file descriptor \fINUM\fP instead of using
\fIgetpass(3)\fP.
If the file descriptor is not connected to a tty then no other message
than the hashed password is printed on stdout.
.TP
.B -s, --stdin
Like \fI--password-fd=0\fP.
.SH "ENVIRONMENT"
.IP "MKPASSWD_OPTIONS"
A list of options which will be evalued before the ones specified on the
command line.
.SH BUGS
If the \fI--stdin\fP option is used, passwords containing some control
characters may not be read correctly.
.TP
This programs suffers of a bad case of featuritis.
.SH "SEE ALSO"
.IR passwd(1),
.IR passwd(5),
.IR crypt(3),
.IR crypt(5),
.IR crypt_gensalt(3),
.IR getpass(3)
.SH AUTHOR
.B mkpasswd
and this man page were written by Marco d'Itri <\fImd@linux.it\fP>
and are licensed under the terms of the GNU General Public License,
version 2 or higher.