MKPASSWD(1)
π 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 is9. here's the 20-character serve:
mkpasswd -l 20
-dβ defines the minimum number of digits that must be in the password. the default is2. 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 is2. lowercase girlies, rise. π·-Cβ defines the minimum number of uppercase alphabetic characters that must be in the password. the default is2. yes,-cand-Care different. yes, that's a vibe check. π-sβ defines the minimum number of special characters that must be in the password. the default is1. sprinkle some chaos in there. π-pβ names a program to set the password. by default,/etc/yppasswdis used if present, otherwise/bin/passwdis 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
- debian bookworm: expect 5.45.4-2+b1
- ubuntu jammy: expect 5.45.4-2build1
- ubuntu noble: expect 5.45.4-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms