Hi Alan, Thanks for all the help last night. I've made a lot of progress today. Max-Daily-Session is now being recognised as a valid attribute and users with the attribute are being authenticated. The problem I now have is that the users are being disconnected after their allocated time has expired but they can log back in again straight away instead of having to wait 24 hours. I have this in the users file DEFAULT Max-Daily-Session := 300 This in radiusd.conf $INCLUDE ${confdir}/sql.conf sqlcounter dailycounter { counter-name = Daily-Session-Time check-name = Max-Daily-Session sqlmod-inst = sql 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'" } instantiate { exec expr noresetcounter daily } Could you please give me some pointers to where I'm going wrong. I've scoured the list archives and Google looking for answers. Regards, Sean
Sean wrote:
Hi Alan, Thanks for all the help last night. I've made a lot of progress today. Max-Daily-Session is now being recognised as a valid attribute and users with the attribute are being authenticated. The problem I now have is that the users are being disconnected after their allocated time has expired but they can log back in again straight away instead of having to wait 24 hours.
Is the NAS sending accounting packets? If not, the server has no way of knowing that the time was used up. Did you list "sql" in the "accounting" section? If not, the accounting information won't be written to SQL. Alan DeKok. -- http://deployingradius.com - The web site of the book http://deployingradius.com/blog/ - The blog
participants (2)
-
Alan DeKok -
Sean