<br><br><div class="gmail_quote">On Tue, Feb 19, 2013 at 2:38 PM, Phil Mayers <span dir="ltr"><<a href="mailto:p.mayers@imperial.ac.uk" target="_blank">p.mayers@imperial.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 19/02/13 06:53, Russell Mike wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Phil & Moby,<br>
<br>
I am also interested in this solution since experiencing the same<br>
problem. I liked the solution no1.<br>
<br>
But I have no idea where I can get that script but I can modify if I<br>
have one.<br>
</blockquote>
<br></div>
It's a pretty simple script. Depending on your SQL database, you just do a "select from radacct where acctstarttime + acctsessiontime < 'now - 2 hours'" or whatever.<br>
<br>
It should be a 1-line SQL query.<br>
<br>
However - I should emphasise that interim accounting and expiring dead SQL sessions is no substitute for a resilient RADIUS service; you should really have two servers, and look to use robust accounting *as well* as interim acct.<div>
<div><br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/<u></u>list/users.html</a><br>
</div></div></blockquote></div><br><div><br></div><div> The more I read about this, the more complicated it gets!</div><div> Dear Phil, the first and third solutions you provided will work great but their implementation is not that easy. As you said above, following the first approach needs packet monitoring as well, which is not easy to implement unless there be a log file/table in freeradius for this packets. And the value for "acctsessiontime" is 0 until the user disconnects and freeradius sets the correct value for this field and some other fields in radacct table.</div>
<div><br></div><div> I also found that sometimes removing the last accounting record for the locked user in the radacct table won't work and you need to set "/var/log/freeradius/radutmp" to null, to unlock that user.</div>
<div><br></div><div> I wish there was a table for online users in NAS and we could compare online user in NAS and online users in RADIUS and decide what to do.</div><div><br></div><div> I am still looking forward for your helpful comments and suggestion on this topic.</div>
<div> </div><div>Thank you,</div><div>Moby</div>