(RADIATOR) Session Timout = until (unknown untill after script is run)
Joel Prine
JPrine at suite224.net
Mon Jul 12 18:29:32 CDT 2004
Setup
Radiator-3.9-1, running on Fedora Linux, Authenticating against a Mysql DB.
Where I am:
I am trying to build an environment to restrict a dial-up account to 10 hours/month (not specific times just once they hit 10 hours they will be disconnected and no longer can logon). I have written a script(PHP) that accounts for the logon time and logoff time, when the user logs on the script is executed via an "Exec-Program" reply. At that time the "time remaining" on their account is calculated and set in the mysql DB.
The crux of the issue:
The problem is that setting the Session-Timeout Attribute that has to happen at Authentication time, before the script is run, and can't update the Session-timeout in the DB before the attribute is sent back to the user.
Possible solution:
I need a way to run a script at logoff, or issue a command at a certain time that will disconnect a user once the time has been calculated, and session been exceeded.
Obvious:
Of course, once a month a crontab will take care of setting the Time remaining to the Total time for the month. (essentially, resetting for the month.) If the Time-remaining is 0:00 then the user will be rejected. I am pretty sure I could get it to the point of calculating the time remaining and not allow the user to logon again after that point, my worry is that the user will not be a good Samaritan and logoff by himself at the end of the 10 hours.
Covering the possibility of being an idiot:
If I am approaching this the hard way let me know, I just have not come across an easy way to accomplish this goal.
Any further information can be added, just let me know.
Thanks for any support or advise,
Email me at:
Joel Prine
CCNA, MCSE
Suite224 Internet
JPrine at Suite224.net
Phone:(440) 593-7113
http://www.suite224.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.open.com.au/pipermail/radiator/attachments/20040712/785b0987/attachment.html>
More information about the radiator
mailing list