Created
January 5, 2012 20:07
-
-
Save mnem/1566984 to your computer and use it in GitHub Desktop.
Quick 'n' dirty password generation commands for *nix/mac
This file contains hidden or 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
# Will generate passwords up to 76 characters long. | |
# | |
# Change the 20 at the end to change the length. | |
dd if=/dev/urandom count=1 2> /dev/null | base64 | sed -ne 2p | cut -c-20 |
This file contains hidden or 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
# Will generate passwords up to 40 characters long. Only uses hex characters | |
# if symbols freak you out. | |
# | |
# Change the 20 at the end to change the length. | |
dd if=/dev/urandom count=1 2> /dev/null | sha1sum | cut -c-20 |
This file contains hidden or 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
# Will generate passwords of any length. Must have openssl installed. | |
# | |
# Change PW_LENGTH=20 at the start to specify the length. | |
PW_LENGTH=20; openssl rand -base64 $PW_LENGTH | tr -d '\n=' | cut -c-$PW_LENGTH |
This file contains hidden or 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
# Will generate passwords of any length. Must have openssl installed. Only | |
# uses hex characters if symbols freak you out. | |
# | |
# Change PW_LENGTH=20 at the start to specify the length. | |
PW_LENGTH=20; openssl rand -hex $PW_LENGTH | cut -c-$PW_LENGTH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lots of lovely hacky single line randomish password generators.