MKPASSWD(1)

πŸ“¦
version 5.45.4 Β· 3 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸŽ€ MKPASSWD(1) β€” the group chat manual πŸ’–

okay bestie, welcome to mkpasswd, living in the General Commands Manual section of your friendly neighborhood Unix. this is the page for mkpasswd, and she's here to make passwords for you and, if you want, drop them straight onto a user. no cap.


✨ NAME ✨

mkpasswd β€” generate new password, optionally apply it to a user


🌸 SYNOPSIS 🌸

mkpasswd [ args ] [ user ]

πŸ’… INTRODUCTION πŸ’…

mkpasswd generates passwords and can apply them automatically to users. that's the whole gig, and she does it flawlessly.

lowkey a fun fact: mkpasswd is based on the code from Chapter 23 of the O'Reilly book "Exploring Expect". like, she's literally book-smart. πŸ“šβœ¨


πŸ¦‹ USAGE πŸ¦‹

With no arguments, mkpasswd just returns a new password. that's it. a lil gift for you.

mkpasswd

With a user name, mkpasswd assigns a new password to that user. main character move honestly.

mkpasswd don

The passwords are randomly generated according to the flags below. so like, read the flags. they matter. πŸ‘‘


πŸ’– FLAGS πŸ’–

  • -l β€” defines the length of the password. the default is 9. here's the 20-character serve:
mkpasswd -l 20
  • -d β€” defines the minimum number of digits that must be in the password. the default is 2. this one gives you at least 3 digits:
mkpasswd -d 3
  • -c β€” defines the minimum number of lowercase alphabetic characters that must be in the password. the default is 2. lowercase girlies, rise. 🌷
  • -C β€” defines the minimum number of uppercase alphabetic characters that must be in the password. the default is 2. yes, -c and -C are different. yes, that's a vibe check. πŸ‘€
  • -s β€” defines the minimum number of special characters that must be in the password. the default is 1. sprinkle some chaos in there. πŸŽ€
  • -p β€” names a program to set the password. by default, /etc/yppasswd is used if present, otherwise /bin/passwd is used. so it checks, and then it chooses. so considerate. 🫢
  • -2 β€” causes characters to be chosen so that they alternate between right and left hands (qwerty-style), making it harder for anyone watching passwords being entered. iconic anti-shoulder-surfer technology. but heads up bestie: this can also make it easier for a password-guessing program. so like, trade-offs. πŸ’€
  • -v β€” causes the password-setting interaction to be visible. by default, it is suppressed. so if you wanna watch the whole thing go down, this is your girl. πŸ‘‘

🌈 EXAMPLE 🌈

The following example creates a 15-character password that contains at least 3 digits and 5 uppercase characters.

mkpasswd -l 15 -d 3 -C 5

ate. no notes. πŸ”₯


πŸ’œ SEE ALSO πŸ’œ

"Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs" by Don Libes, O'Reilly and Associates, January 1995. yes, that's the whole SEE ALSO. go read the book, it's giving foundational. πŸ“–βœ¨


πŸ‘‘ AUTHOR πŸ‘‘

Don Libes, National Institute of Standards and Technology

mkpasswd is in the public domain. NIST and I would appreciate credit if this program or parts of it are used. so like, be nice, give credit, it's the bare minimum bestie. 🫢


and that's the whole page! this beauty comes from the General Commands Manual and she's dated 22 August 1994 β€” a true vintage queen who's still slaying. mwah. πŸ’‹βœ¨πŸŽ€

πŸ“¦ where this page comes from