Created
July 30, 2013 05:54
-
-
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…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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