Last active
February 18, 2021 14:59
-
-
Save slavafomin/ea7c814cf5f0a2a9d28cae11705dca58 to your computer and use it in GitHub Desktop.
Generate .htpasswd file for nginx basic authentication
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
#!/usr/bin/env bash | |
read -p "Username: " USERNAME | |
read -s -p "Password: " PASSWORD; echo | |
printf "${USERNAME}:$(openssl passwd -crypt ${PASSWORD})\n" >> ./.htpasswd |
You're not actually doing anything with
SALT_LENGTH
?
Yep, I've updated the example to remove unnecessary variable. Thanks.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're not actually doing anything with
SALT_LENGTH
?