MKPASSWD(1)

πŸ“¦
version 0.05 Β· 3 versions
, in fedora 43

πŸ’– MKPASSWD πŸ’–

okay bestie, so this is mkpasswd.pl β€” a whole little example program that lives in the User Contributed Perl Documentation corner of your man pages, and it's here to show you how to make brand new passwords with String::MkPasswd. it's giving "tiny script, big utility." ✨


🌸 NAME 🌸

mkpasswd.pl β€” the example that shows you how to generate a fresh new password using String::MkPasswd. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

mkpasswd.pl [-options]

#!/bin/sh
NEW_PASSWD=`mkpasswd.pl`

so like, you run it, and it just... gives you a password. no cap. πŸ”₯


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: this program generates a random password, and it lets you do a little bit of tuning on how the characters get distributed. the finished password goes straight to standard output, so you can pipe it, capture it, whatever your heart desires. πŸ’–


✨ OPTIONS ✨

  • -l #, --length=# β€” how long the whole password is, total. default is 9. πŸ‘‘
  • -d #, --digits=# β€” the minimum number of digits that will show up in the final password. default is 2.
  • -c #, --lower=# β€” the minimum number of lower-case characters that will show up in the final password. default is 2.
  • -C #, --upper=# β€” the minimum number of upper-case characters that will show up in the final password. default is 2.
  • -s #, --special=# β€” the minimum number of non-alphanumeric characters that will show up in the final password. default is 1. πŸŽ€
  • -2, --distribute β€” if you turn this on, the password's characters get spread out between the left-hand and right-hand sides of the keyboard. the whole point? it makes it way harder for an onlooker to clock your password while you're typing it. stealth mode, lowkey. πŸ•΅οΈβ€β™€οΈ
  • --nodigits, --no-digits β€” this is just an alias for --digits=0.
  • --nolower, --no-lower β€” alias for --lower=0.
  • --noupper, --no-upper β€” alias for --upper=0.
  • --nospecial, --no-special β€” alias for --special=0.

πŸ’€ BUGS πŸ’€

  • while it's not really a bug, the .pl extension got tacked on to avoid conflict with the program of the same name that ships with Expect. so like, they had to differentiate. it's giving "two girls, one name, chaos avoided." πŸ™ˆ

⭐ TODO ⭐

  • for completeness, add user password setting functionality like the one found in Expect's mkpasswd(1) example. someday, bestie. someday. ✨

🌈 SEE ALSO 🌈

<http://expect.nist.gov/#examples>, mkpasswd(1), String::MkPasswd


🫢 AKNOWLEDGEMENTS 🫢

big love to Don Libes of the National Institute of Standards and Technology, who wrote the Expect example, mkpasswd(1). king behavior, honestly. πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

Chris Grau <cgrau@cpan.org>


Copyright (C) 2003-2004 by Chris Grau

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available.


okay and that's the whole page, periodt. this little gem shipped as part of perl v5.42.0 and got dated 2025-07-25 β€” so yeah, it's been out here living its main character era since forever and it's still slaying. bye bestie, go make a password πŸ’…βœ¨

πŸ“¦ where this page comes from