summaryrefslogtreecommitdiffstats
path: root/mkpasswd.1
blob: 121cc5a302f9bc2dee5076ad22b0bc3750b0a935 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.TH MKPASSWD 1 "2019-12-30" "Marco d'Itri" "Debian GNU/Linux"
.SH NAME
mkpasswd \- Overfeatured front end to crypt(3)
.SH SYNOPSIS
.B mkpasswd
.I PASSWORD
.RI [ SALT ]
.SH DESCRIPTION
.B mkpasswd
encrypts the given password with the
.BR crypt (3)
libc function, using the given salt.
.SH OPTIONS
.TP
.BR \-S ", "\c
.BI \-\-salt= STRING
Use the
.I STRING
as salt. If it begins with
.I $
then it will be passed straight to
.BR crypt (3)
without any checks.
.TP
.BR \-R ", "\c
.BI \-\-rounds= NUMBER
Use
.I NUMBER
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
.IR \-\-method .
.TP
.BR \-m ", "\c
.BI \-\-method= TYPE
Compute the password using the
.I TYPE
method.
If
.I TYPE
is
.I help
then the list of available methods is printed.
If
.I TYPE
begins and end with
.I $
characters then the string is passed to
.IR crypt_gensalt (3)
as-is.
.TP
.B -5
Like
.IR \-\-method=md5crypt .
.TP
.B \-P \c
.IR NUM ", "\c
.BI \-\-password-fd= NUM
Read the password from file descriptor
.I NUM
instead of using
.IR getpass (3).
If the file descriptor is not connected to a tty then no other text
than the hashed password is printed on stdout.
.TP
.BR \-s ", " \-\-stdin
Like
.IR \-\-password-fd=0 .
.SH ENVIRONMENT
.IP "MKPASSWD_OPTIONS"
A list of options which will be evaluated before the ones specified on the
command line.
.SH BUGS
If the
.I \-\-stdin
option is used then passwords containing some control
characters may not be read correctly.
.P
This program 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
.RI < md@linux.it >
and are licensed under the terms of the GNU General Public License,
version 2 or later.
\" SPDX-License-Identifier: GPL-2.0-or-later