[SQU] Authentication error/ odd behaviour

From: Richard Kershaw <Richard.Kershaw@dont-contact.us>
Date: Fri, 18 Aug 2000 15:27:30 +1000

G'day all.

I've noticed something odd about the authenticator processes
in squid, and I was wondering if anyone else had noticed
the same problem.

The current situation is that there is a local copy of
a LDAP directory password file kept on each of the squid boxes,
and a /bin/bash based script that interprets and checks users
againt the file.

What happens is that over time an increasing number of
authentication processes are marked as permanently busy
(as according to cachemgr) and no longer respond.

There is another script that I've written, it _immediately_
(after 1 access) marks all authentication processes busy,
and doesn't respond at all.

Both scripts act in the expected way from the command line.
-They don't exit
-They accept a space delimited username/password pair, ended by
a carriage return
-They respond with OK, or ERR and wait for the next username
password pair

Does anyone have any ideas?

*******************************************
*********Current script - newauth**********
*******************************************
#!/bin/sh

while true;
do
        read user_name user_passwd
        /net/squid/bin/new_auth $user_name $user_passwd
done
*******************************************
********feeder script - new_auth***********
*******************************************
#!/bin/bash

# This file gets handed user_name and user_passwd as $1 and $2
# Check username password against file

if [ $* != 2 ];
        then echo ERR;
else
        cd /net/scape/v4/bin/slapd/server;
        if [ `/bin/grep $1 /net/squid/passwd | cut -f2 -d: ` = `./pwdhash $2` ]; then
                echo OK;
        else
                echo $1 $2 | /net/squid/bin/ldap_auth directory.monash.edu.au
        fi
fi
*******************************************
*******************************************

Regards
Richard Kershaw
Web Server Administrator
Monash University

--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Thu Aug 17 2000 - 23:30:02 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:54 MST