Check out the rlm_sqlcounter module. Read doc/rlm_sqlcounter. In your
sqlcounter.conf file you can use something like this.
sqlcounter poolofminutes {
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}'"
}
Then in your sql table, you'll add something like this for say user bob
insert into radcheck set UserName = 'bob', Attribute =
'Max-All-Session-Time', Value = '2592000', op = ':=';
This will insert the Max-All-Session-Time of 2592000 seconds
(30*24*60*60).
Hope that helps,
-Dusty Doris
On Tue, 17 Aug 2004, sarky wrote:
> Hi all
>
> I am using Mysql to do the restrictions.
>
> I want to do something like this:
> When a user logs in for the first time it will give a restriction
> of 30days access time, i.e: logged on: 1st Jan 2004 then it expires 30th Jan 2004
>
> Thank you
>
> Sarky
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html