Jason Thompson wrote:
> I am in the process of setting up a squid cache at a school where I work. We
> need to have passwords protecting Internet access. Our first idea is to
> create all the users on the cache box using the standard add user program.
> Then use squid to check that when authenticating people.
>
> Is this possible, and is it a good idea to do this?
Doable, yes. Recommended not.
It is better to create a separate password file using htpasswd (from
apache), and configure Squid to use the ncsa_auth authentication module
against this file.
> We need to be able to add users, change user passwords, and delete users.
> Via the command line.
Adding and changing passwords is easily doable with the htpasswd
command. Delete can easily be done with the following script:
#!/bin/sh -e
if [ $# -ne 2 ]; then
echo "Usage: $0 passwdfile username"
exit 1
fi
cat $1 | grep -v "^${2}:" >$1.tmp
mv -f $1.tmp $1
-- Henrik Nordstrom Squid hackerReceived on Sat Oct 16 1999 - 08:10:09 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:48:55 MST