Skip to content

Instantly share code, notes, and snippets.

@TiGR
Last active August 22, 2016 18:18
Show Gist options
  • Save TiGR/9db1a53cce868f578baf to your computer and use it in GitHub Desktop.
Save TiGR/9db1a53cce868f578baf to your computer and use it in GitHub Desktop.
htpasswd entries generator.
#!/bin/bash
read -p 'Username: ' name && read -s -p 'Password: ' pass && (>&2 echo) && echo "$name:$(openssl passwd -apr1 $pass)"
@TiGR
Copy link
Author

TiGR commented Jan 14, 2015

Usage:

./htpassgen.sh >> /path/to/htpasswd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment