MKPASSWD_OPTIONS
A list of options which will be evaluated before the ones specified on the command line.
Overfeatured front end to crypt(3)
mkpasswd PASSWORD
[SALT]
mkpasswd encrypts the given password with the crypt(3) libc function, using the given salt.
-S STRING, --salt=STRING
Use the STRING as salt. If it begins with $ then it will be passed straight to crypt(3) without any checks.
-R NUMBER, --rounds=NUMBER
Use 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 --method.
-m TYPE, --method=TYPE
Compute the password using the TYPE method. If TYPE is help then the list of available methods is printed. If TYPE begins and end with $ characters then the string is passed to crypt_gensalt(3) as-is.
-5
Like --method=md5crypt.
-P NUM, --password-fd=NUMRead the password from file descriptor NUM instead of using getpass(3). If the file descriptor is not connected to a tty then no other text than the hashed password is printed on stdout.
-s, --stdin
Like --password-fd=0.
MKPASSWD_OPTIONS
A list of options which will be evaluated before the ones specified on the command line.
14 releases since Debian 2.2 (Potato); the text changed 8 times.
--method since Debian 13 (Trixie);
--rounds since Debian 13 (Trixie);
--salt since Debian 13 (Trixie);
--stdin since Debian 3.0 (Woody);
-5 since Debian 6.0 (Squeeze);
-R since Debian 13 (Trixie);
-S since Debian 13 (Trixie);
-m since Debian 13 (Trixie);
-s since Debian 3.0 (Woody).
--hash until Debian 4.0 (Etch);
--password-fd until Debian 10 (Buster);
-H until Debian 4.0 (Etch);
-P until Debian 12 (Bookworm).