Hi
I'm running FreeRADIUS 0.81 with MySQL for auth and acct, all works dandy.
I'm looking for some guidance on how to limit a user's session time (i.e. to
1 hour) within a 24 hour period and not reset the counter afterwards.
My sqlcounter.conf looks like this (the "daily" counter provided in the
example with the reset set to never instead of daily):
sqlcounter hourcounter {
counter-name = Max-Hour-Session-Time
check-name = Max-Hour-Session
sqlmod-inst = sql
key = User-Name
reset = never
query = "SELECT SUM(AcctSessionTime - GREATEST((%b -
UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' AND
UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"
}
I set Max-Hour-Session to 3600 in radgroupcheck and the login does expire
after an hour's usage but not within a 24 hour period, I can use it over
several days until the limit is reached.
I've searched the archive and tried out a few variations but no joy. Is
this possible?
Thanks for any enlightenment,
Rog.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html