Created
July 11, 2013 08:19
-
-
Save sebastianwagner/5973542 to your computer and use it in GitHub Desktop.
Create password hashes for magento using salt from stdin or terminal
requires pwgen
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
#!/bin/sh | |
# magento_adminpassword.sh | |
# | |
# reads an password from stdin or terminal and creates hash with salt for magento | |
# USAGE | |
# echo hai | ./adminpassword.sh | |
# or | |
# ./adminpassword.sh | |
# depends on pwgen for creation of salt | |
read -p 'password: ' PASS; SALT=$(pwgen -s 2 1); echo $(echo -n "$SALT$PASS"| md5sum | cut -d \ -f 1):"$SALT" | |
# check with | |
# echo -n i8hai| md5sum | |
# where i8 is the salt given and hai the password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment