Hello Milver,

                      Do u have any idea how to update the user account?
example im setup prepaid internet access using freeradius. im include
rlm_sqlcounter in the config and it works perfectly. Now my problem is
because im configured rlm_sqlcounter for noresetcounter it works when the
user consume all his example 10 hrs of prepaid internet. Then as expected
he/she cant login anymore. what about if the user update his/her account?
Same username with the same password. Although were using prepaid internet
but we have a constant username of the user. thanks very much ...


----- Original Message ----- 
From: "Milver S. Nisay" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 11:57 PM
Subject: Re: setting up accounting in mysql


>
> > I can see that I have rlm_sqlcounter but I don't see the sqlcounter.conf
> >
> > Where or how do I get it?
>
> download the latest CVS pls. it should be something like this
>
> sqlcounter noresetcounter {
>                 driver = "rlm_sqlcounter"
>                 counter-name = Max-All-Session-Time
>                 check-name = Max-All-Session
>                 sqlmod-inst = sql
>                 key = User-Name
>                 reset = never
>
>                 query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE
> UserName='%{%k}'"
>
>         }
>
>
> sqlcounter dailycounter {
>                 driver = "rlm_sqlcounter"
>                 counter-name = Daily-Session-Time
>                 check-name = Max-Daily-Session
>                 sqlmod-inst = sqlcca3
>                 key = User-Name
>                 reset = daily
>
>                 query = "SELECT SUM(AcctSessionTime - GREATEST((%b -
> UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}'
AND
> UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
>
>         }
>
> sqlcounter monthlycounter {
>                 counter-name = Monthly-Session-Time
>                 check-name = Max-Monthly-Session
>                 sqlmod-inst = sqlcca3
>                 key = User-Name
>                 reset = monthly
>
>                 query = "SELECT SUM(AcctSessionTime - GREATEST((%b -
> UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}'
AND
> UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
>
>         }
>
>
> //milver
>
>
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
>
>


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to