Helper when htpasswd is not available
- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| bin | ||
| README.md | ||
htpass
Prints an htpasswd line for a user, without needing the apache2-utils /
apache-tools package installed.
Installation
tpm install htpass
Usage
htpass alice # asks for the password, prints the line
htpass alice >> .htpasswd # append to an existing file
Output looks like:
alice:$6$Xy...$...
Notes
- The password is asked interactively (twice) by
openssl passwd, so it never ends up in the shell history. - The hash is SHA-512 crypt (
openssl passwd -6), understood by nginx and Apache basic auth.