Skip to content

Instantly share code, notes, and snippets.

@Grogdor
Created September 21, 2015 05:26
Show Gist options
  • Save Grogdor/717bee1ff84d29df455a to your computer and use it in GitHub Desktop.
Save Grogdor/717bee1ff84d29df455a to your computer and use it in GitHub Desktop.
create htpasswd
#!/bin/sh
user=$1
realm=$2
pass=$3
hash=`echo -n "$user:$realm:$pass"| md5 | cut -b -32`
echo "$user:$realm:$hash"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment