Skip to content

Instantly share code, notes, and snippets.

@jimmidyson
Created June 12, 2014 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimmidyson/6027424bf27fabb6a0ec to your computer and use it in GitHub Desktop.
Save jimmidyson/6027424bf27fabb6a0ec to your computer and use it in GitHub Desktop.
Generate SHA512 password hash from password with random salt
SALT=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 18 | head -1` \
python -c "import crypt, getpass, pwd, os; print crypt.crypt('password', '\$6\$' + os.environ['SALT'] + '\$')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment