Thanks all,I am currently running FreeRADIUS Version 2.1.12,
mysql version 5.1.73
however, I noticed the counter just keep counting without terminating the user.
my radgroupcheck is as follows:
mysql> select * from radgroupcheck;
+----+-----------+------------------+----+-------+
| id | groupname | attribute | op | value |
+----+-----------+------------------+----+-------+
| 1 | validity | Max-Secs-Passed | := | 300 |
| 2 | validity | Idle-Timeout | += | 300 |
| 3 | validity | Simultaneous-Use | := | 1 |
+----+-----------+------------------+----+-------+
3 rows in set (0.00 sec)
my counter.conf has the following:
sqlcounter validity {
counter-name = All-Secs-Passed
check-name = Max-Secs-Passed
sqlmod-inst = sql
key = User-Name
reset = daily
query = "SELECT UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(AcctStartTime) secs_passed_since_start FROM radacct WHERE UserName = '%{%k}' LIMIT 1"
}
an attribute called validity and I set Max-Secs-Passed to 300.
however, I discover the query is not returning values in secs and I will like the user to spend only an hour a day and reset the counter the following day to zero for another 1 hour everday.
Can someone assists?