(RADIATOR) Session Timout = until (unknown untill after script is run)

Hugh Irvine hugh at open.com.au
Mon Jul 12 19:33:53 CDT 2004


Hello Joel -

There is an example showing how to do this sort of thing in 
"goodies/prepaid.cfg".

You shouldn't need to use PHP or Exec-Program.

regards

Hugh


On 13 Jul 2004, at 09:29, Joel Prine wrote:

> 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
>  
>  
>

NB: have you included a copy of your configuration file (no secrets),
together with a trace 4 debug showing what is happening?

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. Available on *NIX, *BSD, Windows, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.
-
CATool: Private Certificate Authority for Unix and Unix-like systems.

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list