On ons, 2008-07-30 at 11:29 +0200, Ralf Hildebrandt wrote:
> with /etc/squid/wlan-proxyauth.digest containing:
>
> user:password
>
> Can I, in a simple fashion, switch to auth_param basic with the same
> (or easily modified) /etc/squid/wlan-proxyauth.digest file?
The following simple shell script should work:
## CUT HERE ###
#!/bin/sh
pwfile=$1
while read user password; do
pass="`grep "$user:" $pwfile| cut -d: -f2-`"
if [ "$password" = "$pass" ]; then
echo OK
else
echo ERR
fi
done
## CUT HERE ###
Not the most efficient, but should get the job done.
If you have usernames with national symbols then a little more work is
needed..
Alternatvely you can use the password file as a batch input to htpasswd
generating a more secure hashed passwordfile.
Regards
Henrik
Received on Thu Jul 31 2008 - 01:21:25 MDT
This archive was generated by hypermail 2.2.0 : Thu Jul 31 2008 - 12:00:05 MDT