block users on-the-fly

Peter Nixon listuser at peternixon.net
Mon Oct 16 16:04:33 CEST 2006


On Mon 16 Oct 2006 16:25, Guilherme Franco wrote:
> Hi,
>
> Does anyone already have a program to block freeradius on-the-fly?
>
> ie: user has PAID = YES in radcheck table.

Sure.

Change:
authorize_check_query = "SELECT id, UserName, Attribute, Value, Op \
 FROM ${authcheck_table} \
 WHERE Username = '%{SQL-User-Name}' AND calledstationid 
= '%{Called-Station-Id}' \
 ORDER BY id"

to

authorize_check_query = "SELECT id, UserName, Attribute, Value, Op \
 FROM ${authcheck_table} \
 WHERE Username = '%{SQL-User-Name}' AND calledstationid 
= '%{Called-Station-Id}' \
 AND PAID = 'YES' \
 ORDER BY id"

Cheers

-- 

Peter Nixon
http://www.peternixon.net/
PGP Key: http://www.peternixon.net/public.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20061016/160c02e3/attachment.pgp>


More information about the Freeradius-Users mailing list