MKPASSWD(1)
๐ MKPASSWD ๐
okay bestie, so this is the mkpasswd(1) page from your Debian GNU/Linux manual, section 1 โ and the vibe is: it's an Overfeatured front end to crypt(3). yes, that's literally what the NAME says. it said it, not me. ๐
โจ SYNOPSIS โจ
mkpasswd PASSWORD [SALT]
๐ธ DESCRIPTION ๐ธ
so here's the whole deal, and honestly it's giving minimal. mkpasswd takes your password and encrypts it using the crypt(3) libc function โ with the salt you hand it. that's it. that's the job. ๐
๐ OPTIONS ๐
this is where the "overfeatured" part comes in, and I mean... the man page said it first:
-S STRING,--salt=STRINGโ use STRING as the salt. but listen, if that string starts with$, it gets yeeted straight tocrypt(3)with zero checks. no screening, no vibes check, just straight through. ๐ซถ-R NUMBER,--rounds=NUMBERโ use NUMBER rounds. now, this argument gets ignored if the method you picked doesn't do variable rounds โ so don't get attached. for the OpenBSD Blowfish method, this number is the logarithm of the number of rounds. and btw, the behavior is undefined if you use this without--method. undefined bestie. not a joke. ๐ญ-m TYPE,--method=TYPEโ compute the password with the TYPE method. ifTYPEishelp, you get the whole list of available methods printed out โ cute, a menu. and ifTYPEbegins and ends with$characters, then the string is passed tocrypt_gensalt(3)as-is. ๐ซ-5โ literally just like saying--method=md5crypt. a lil shortcut. iconic. โญ-P NUM,--password-fd=NUMโ read the password from file descriptor NUM instead of usinggetpass(3). and here's the tea: if that file descriptor is not connected to a tty, then nothing but the hashed password gets printed on stdout. clean output, no extra chatter. ๐คซ-s,--stdinโ exactly like--password-fd=0. same energy, shorter to type. โจ
๐ ENVIRONMENT ๐
MKPASSWD_OPTIONSโ a list of options that gets evaluated before the ones you type on the command line. so yeah, it goes first. ๐
๐ BUGS ๐
okay we have to be honest here, this is the part where we hold hands:
if you use the --stdin option, then passwords containing some control characters may not be read correctly. so like... be careful. ๐ฅฒ
and also, and I quote: this program suffers of a bad case of featuritis. the man page said it. the man page is not wrong. not me being shady, I'm just the messenger. ๐
๐ฆ SEE ALSO ๐ฆ
go read these, they're the extended universe:
passwd(1), passwd(5), crypt(3), crypt(5), crypt_gensalt(3), getpass(3).
๐ AUTHOR ๐
mkpasswd and this man page were written by Marco d'Itri <md@linux.it>, and they're licensed under the terms of the GNU General Public License, version 2 or later. slay, honestly. ๐
and that's a wrap, bestie!! ๐ this page was brought to you by Marco d'Itri, dated 2019-12-30, from the MKPASSWD(1) manual page โ go forth and hash responsibly, mwah ๐ โจ
๐ฆ where this page comes from
- arch rolling: whois 5.6.6-1 ยท GPL
- debian trixie: whois 5.6.3
- fedora 43: mkpasswd 5.6.4-1.fc43 ยท GPL-2.0-or-later
- fedora 43: mkpasswd 5.6.6-1.fc43 ยท GPL-2.0-or-later
- fedora 44: mkpasswd 5.6.6-1.fc44 ยท GPL-2.0-or-later
- nixpkgs unstable: mkpasswd 5.6.6
- opensuse-leap 16.0: whois 5.6.2-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: whois 5.6.2-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: whois 5.6.2-160000.2.2 ยท GPL-2.0-or-later
- opensuse-leap 16.0: whois 5.6.2-160000.2.2 ยท GPL-2.0-or-later
- ubuntu questing: whois 5.6.4
- ubuntu resolute: whois 5.6.6
- ubuntu stonking: whois 5.6.6
- ๐ the page's license: GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms