(RADIATOR) Session-timeout="until Time" and Time = "MoTuWe0800-1400,Wk2200-0400"
Hugh Irvine
hugh at open.com.au
Wed May 12 21:05:52 CDT 2004
Hello Jason -
You can do pretty much what you show below in a PostAuthHook.
See the examples in "goodies/hooks.txt".
You could also do it with some fancy SQL or a stored procedure.
regards
Hugh
On 13 May 2004, at 00:31, Jason Godsey wrote:
>
> For my senario: The time is Friday, 02:00.
>
> select password, time_left, rad_reply from users where username='%n'
> password="test"
> time_left=6600
> rad_reply = Time = "MoTuWe0800-1400,Wk2200-0400", \
> Session-timeout="until Time"
>
> 02:00 to 04:00 is 2 hours (7200 seconds) but I also want to enforce
> maximum usage constraints (say 100 hours / month).
>
> So my user has 6600 seconds left on her account, but 7200 seconds to
> the end of their Time = access window.
>
> This is basically what I want to do:
> perl -e '$max=shift; $value=shift; printf("Session-Timeout=%d\n",
> $value > $max ? $max : $value); ' 6600(time_left) 7200(until Time)
>
> yeilding Session-Timeout = 6600
>
> and the same is true of the user having 8000 seconds left:
> perl -e '$max=shift; $value=shift; printf("Session-Timeout=%d\n",
> $value > $max ? $max : $value); ' 8000(time_left) 7200(until Time)
>
> and Session-Timeout = 7200
>
> Thank you,
>
> Jason
>
> --
> 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.
>
>
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