I manage a number of devices for customers that require I manually set them up with passwords. Rather than using LastPass to generate passwords (polluting my personal LastPass with "Generated Password for ..." links), I use this little script. It generates a random password, and pipes it in to my clipboard.
Created
April 29, 2015 18:19
-
-
Save jamestalmage/0411a8267c58dd9f7a77 to your computer and use it in GitHub Desktop.
Command Line Random Password Generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
GEN_PASS=$(dd if=/dev/urandom bs=1 count=9 2>/dev/null | base64 | rev | cut -b 2- | rev) | |
echo $GEN_PASS | |
echo $GEN_PASS | pbcopy | |
GEN_PASS=0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment