Search squid archive

Re: Switching from digest auth to basic auth?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux