<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Hi everybody!!</p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I have been using Freeradius as AAA of some wireless hotspots and it works great!!</p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
After reading the <span style="line-height:15px;font-size:small">Rlm_</span><span style="line-height:15px;font-size:small">sqlcounter wiki page I started to use it, and it also works great. This is the code of my sqlcounters:</span></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif;background-color:rgb(255,255,255)"><span style="line-height:15px"><br></span></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<span style="line-height:15px"><br></span></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;background-color:rgb(255,255,255)"></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<font face="arial, sans-serif"><span style="line-height:15px">sqlcounter dailycounter {</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font face="arial, sans-serif"><span style="line-height:15px">        counter-name = Daily-Session-Time</span></font></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font face="arial, sans-serif"><span style="line-height:15px">        check-name = Max-Daily-Session</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<font face="arial, sans-serif"><span style="line-height:15px">        reply-name = Session-Timeout</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font face="arial, sans-serif"><span style="line-height:15px">        sqlmod-inst = sql</span></font></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><font face="arial, sans-serif"><span style="line-height:15px">        key = User-Name</span></font></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">
<font face="arial, sans-serif"><span style="line-height:15px">        reset = daily</span></font></p><div><div><font face="arial, sans-serif"><span style="line-height:15px">        query = "SELECT SUM(acctsessiontime) FROM radacct  WHERE \</span></font></div>
<div><font face="arial, sans-serif"><span style="line-height:15px">        username='%{%k}' AND acctstarttime > FROM_UNIXTIME('%b')"</span></font></div><div><div><font face="arial, sans-serif"><span style="line-height:15px">}</span></font></div>
<div style="font-family:arial,sans-serif;line-height:15px"><br></div></div></div><div><div><font face="arial, sans-serif"><span style="line-height:15px">sqlcounter noresetcounter {</span></font></div><div><font face="arial, sans-serif"><span style="line-height:15px">        counter-name = Max-All-Session-Time</span></font></div>
<div><font face="arial, sans-serif"><span style="line-height:15px">                check-name = Max-All-Session</span></font></div><div><font face="arial, sans-serif"><span style="line-height:15px">                sqlmod-inst = sql</span></font></div>
<div><font face="arial, sans-serif"><span style="line-height:15px">                key = User-Name</span></font></div><div><font face="arial, sans-serif"><span style="line-height:15px">                reset = never</span></font></div>
<div><div><font face="arial, sans-serif"><span style="line-height:15px">               query = "SELECT (UNIX_TIMESTAMP( NOW() ) - IFNULL(UNIX_TIMESTAMP(acctst$</span></font></div><div><font face="arial, sans-serif"><span style="line-height:15px"><br>
</span></font></div><div><font face="arial, sans-serif"><span style="line-height:15px">}</span></font></div><div style="font-family:arial,sans-serif;line-height:15px"><br></div></div></div><div style="font-family:arial,sans-serif;line-height:15px">
Everything works fine, but now I have a question about the dailycounter:</div><div style="font-family:arial,sans-serif;line-height:15px">I have some users that I need to reject their sessions at midnight, because of that Im using the dailycounter... but I need that user can't login again (the user is valid only 1 day). </div>
<div style="font-family:arial,sans-serif;line-height:15px">In this moment the user can login again the next day. How can I do to invalid the user after midnight?</div><div style="font-family:arial,sans-serif;line-height:15px">
<br></div><div style="font-family:arial,sans-serif;line-height:15px">An example of an user:</div><div style="font-family:arial,sans-serif;line-height:15px"><br></div><div style="font-family:arial,sans-serif;line-height:15px">
radcheck table</div><div style="font-family:arial,sans-serif;line-height:15px">username: user1</div><div style="font-family:arial,sans-serif;line-height:15px">User-Password
:="" </div><div style="font-family:arial,sans-serif;line-height:15px"><br></div><div style="font-family:arial,sans-serif;line-height:15px">radusergroup table</div><div><font face="arial, sans-serif"><span style="line-height:15px">username: user1</span></font></div>
<div>groupname: 1day</div><div><br></div><div>radusergroup table</div><div>groupname: 1day</div><div>Max-Daily-Session
:=
12000</div><div><br></div><div>Thanks a lot!!</div><div style="font-family:arial,sans-serif;line-height:15px"><br></div><p></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<b style="font-size:13px;color:rgb(34,34,34)"><br></b><b style="font-size:13px;color:rgb(34,34,34)"><span style="font-size:10pt">Andres Gomez</span></b></p>