2016-05-13 - Re: Last user…. (MAC based)

Header Data

From: José Borges <jo***s@algardata.pt>
Message Hash: 451500ba2a125fb104500ba7a7f73e6e62287eb9acab3edc2ef6b7ceab2411aa
Message ID: <2e58f5d4-9b0f-400e-bb04-0a567a931d71@grasehotspot.org>
Reply To: <CAESLx0J2XFB+EE6tZj3-VeQFwbpmTr-HtY=w2VGLjcADNjKRwA@mail.gmail.com>
UTC Datetime: 2016-05-13 08:28:10 UTC
Raw Date: Fri, 13 May 2016 08:28:10 -0700

Raw message

Tim,

On the same subject, we had to change the code that did the 2 months 
cleaning up (of sessions/vouchers) due to legal necessities in Europe 
(Portugal), where we have to keep the last 12 months of history in the 
HOTSPOT, maybe it would be nice, to have a parameter in backoffice to say 
"Clean history after (months):"


sexta-feira, 13 de Maio de 2016 às 00:18:23 UTC+1, timwhite88 escreveu:
>
> Hi Paul,
> In future post things like this to the list. Others may have already 
> written scripts that can help you.
>
> 3 Months is a tricky time frame. Last login details are in the radpostauth 
> table. That's cleaned up regularly though, at the 2 month mark I think. So 
> the next place to look is if there are any entries in the mtotacct table 
> (something like that, I'm not near the code at the moment). It's the table 
> that we archive (around the 2 month mark) previous sessions into a single 
> monthly summary.
>
> So if there are no entries in that table for the last 3 months, and no 
> entires in the radpostauth table for the last 3 months, then they are 
> inactive.
>
> Also, not sure why you need the radcomment table to get MAC addresses. The 
> radcheck table should have all enabled users in it.
>
> If you work out the query you need, I can add it to the nightly cron job, 
> and make it an option to run it from the admin interface. (Although to mail 
> you you'd need to update the crontab)
>
> Looking forward to seeing how you go.
>
> Tim
>
> On Fri, May 13, 2016 at 12:29 AM, J.P van Oijen <je***.@gids.nl 
> <javascript:>> wrote:
>
>>
>> Hai Tim,
>>
>> Before going/posting into the mailgroup can I ask you something?
>>
>> I want to make a cleanup script that automaticaly mails me users that are 
>> 3
>> months without activity. After that I can delete them keepipng the list 
>> clean.
>>
>> My idea was:
>>
>> - read radius radcomment to get a list of all current MAC addresses 
>> allowed (I
>> use only mac addresses for users)
>>
>> - And than search for that MAC address for the last access / succesful 
>> login
>>
>> Would that be working as I have troubles finding that last successful 
>> login
>> date / last access.
>>
>> Maybe you can provide a hint...
>>
>> Chrs Paul
>>
>>
>>
>>
>

Thread