Created
September 30, 2018 20:58
-
-
Save zinovyev/71e8ca7e50f713f14b98ccd60a99588a to your computer and use it in GitHub Desktop.
Save it to excutable PATH and use command similar to htpasswd without need to have Apache installed
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 | |
USER=$1 | |
PASSWORD=$2 | |
HTPASSWD=$3 | |
printf "$USER:$(openssl passwd -crypt $PASSWORD)\n" >> $HTPASSWD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment