Hi, Thank you for your patience. I am very happy someone can help me. Now I made some progress. I find out what the problem is now. In the query you provided I need to put quotes around radacct. Like this: query = "SELECT IFNULL(TIME_TO_SEC(TIMEDIFF(NOW(), MIN(AcctStartTime))),0) FROM *`radacct` *WHERE UserName='%{%k}' ORDER BY AcctStartTime LIMIT 1;" Now, have one more problem. My NAS (Mikrotik) is not receiving the Session-Timout. I cannot see it in the NAS log. I only can see Acct-Session-Time. Therefore it is not terminating the session. For testing I have set the time limit to 60 seconds. Freeradius is sending it: (2) dailycounter : Sent Reply-Item for user hello, Type=Session-Timeout, value=60 (2) [dailycounter] = ok Sending Access-Challenge of id 232 from 10.1.1.2 port 135 to 27.33.228.125 port 47097 Session-Timeout = 60 EAP-Message = 0x010200061920 Message-Authenticator = 0x00000000000000000000000000000000 State = 0x543a9074553889da6f504855ab4e7a4b (2) Finished request 2. I did not put anything in the radreply for the user. When I did put Session-Timeout=60 in radreply, I still cannot see it in the NAS log. Is it my a problem with NAS configuration? What should I do now? Jake He On Tue, May 13, 2014 at 5:12 PM, Arran Cudbard-Bell < a.cudbardb@freeradius.org> wrote:
On 13 May 2014, at 08:46, * <zhex900@gmail.com> wrote:
You mean I need to upgrade to 3.0.3?
yes.
Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS Development Team
FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html