Skip to content

Instantly share code, notes, and snippets.

@Weeker
Created July 30, 2013 05:54
Show Gist options
  • Select an option

  • Save Weeker/6110550 to your computer and use it in GitHub Desktop.

Select an option

Save Weeker/6110550 to your computer and use it in GitHub Desktop.
digest_passwd.sh # Make /etc/squid/digest_password this way: ## First get a script... ## wget http://dl.dropbox.com/u/52078/digest_passwd.sh (contents below) ## Execute something similar to the following ### sh ./digest_passwd.sh your_username_here your_password_here 'Squid proxy-caching web server' > /etc/squid/digest_passwd # need to execute a…
#!/bin/sh
user=$1
pass=$2
realm=$3
if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
echo "Usage: $0 user password 'realm'";
exit 1
fi
ha1=$(echo -n "$user:$realm:$pass"|md5sum |cut -f1 -d' ')
echo "$user:$realm:$ha1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment