Skip to content

Instantly share code, notes, and snippets.

@bonelifer bonelifer/hash.sh
Last active Feb 4, 2016

Embed
What would you like to do?
Automate adding User to passworded lighttpd protected directory
#!/bin/sh
user=$1
realm=$2
pass=$3
hash=`echo -n "$user:$realm:$pass" | md5sum | cut -b -32`
echo "$user:$realm:$hash"
echo "$user:$realm:$hash" >> /etc/lighttpd/.htpasswd/lighttpd-htdigest.user
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.