summaryrefslogtreecommitdiffstats
path: root/mkpasswd.1
diff options
context:
space:
mode:
Diffstat (limited to 'mkpasswd.1')
-rw-r--r--mkpasswd.194
1 files changed, 94 insertions, 0 deletions
diff --git a/mkpasswd.1 b/mkpasswd.1
new file mode 100644
index 0000000..121cc5a
--- /dev/null
+++ b/mkpasswd.1
@@ -0,0 +1,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