SQL Counter

Sean sean at swarmhotspots.com
Mon Dec 11 20:04:02 CET 2006


Hi,

Sorry if this is a repeat. I'm not sure if an email I sent yesterday got
through.

Clearly I'm missing something simple here. I'm trying to create accounts
that will renew on a daily or monthly basis.

I've put this code into my radiusd.conf file to test daily renewals.

$INCLUDE  ${confdir}/sql.conf


                sqlcounter dailycounter {
         counter-name = Daily-Session-Time
         check-name = Max-Daily-Session
         sqlmod-inst = sql
         key = User-Name
         reset = daily
         query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE
UserName='%{%k}'"
         }

I've created this account in the MySQL radcheck table.

ropgis12 User-Password := gisnopum
ropgis12 Simultaneous-Use:= 1 
ropgis12 Max-Daily-Session := 1800

radiusd -X gives the following result.

rlm_sql (sql): Reserving sql socket id: 0
rlm_sql: Failed to create the pair: Unknown attribute
"Max-Daily-Session"
rlm_sql (sql): Error getting data from database
rlm_sql (sql): SQL query error; rejecting user
rlm_sql (sql): Released sql socket id: 0
  modcall[authorize]: module "sql" returns fail for request 39
modcall: group authorize returns fail for request 39


I can't understand why Max-Daily-Session is an unknown attribute when
it's declared in the radiusd.conf and radius loads with no errors.

As usual any help would be appreciated.

Sean Bracken 
 





More information about the Freeradius-Users mailing list