Hello Chris -

On Thursday 01 March 2001 15:11, Chris M wrote:
> I'm trying to figure out how to do a couple new things with Radiator that
> are well beyond what I've done before.
>

OK

> One thing I'd like to do is a SQL query during the authentication process.
> What it would do is add up all the past time records to see if they have
> exceeded their monthly limit (100 hours or whatever).  This would be in
> addition to all the normal simultaneous use checking, etc. I'd also like to
> detect that they attempted a login when they have exceeded their use, so
> that tech support can be alerted to this.
>

I would suggest that you decrement the monthly time every time you get an 
accounting stop. There is an example of how to do this in the file 
"goodies/radmin.cfg", and you could also send a Session-Timeout set to the 
number of seconds remaining (you should keep track of the time in seconds).

You can reset the monthly time value with a cron job at the beginning of each 
month.

> So from the reading I've done, I believe that doing this in the
> PreProcessingHook is the best place, no?  This would also allow me to write
> out a message to the log that could be detected, or perhaps I should
> instead do this in the PostAuthHook where I can munge the request to
> Access-Reject and also be able to have the database handle from <AuthBy
> SQL> available to write to the RADLOG messages log?
>

If you set up your AuthSelect to check the time remaining, this should happen 
automatically. Again, have a look at how AuthBy RADMIN does this.

> In the same piece of code I'll want to query the database, knowing the
> Client-Id (the NAS box that they came from) and also decide whether they
> can log in.
>

You may be able to use the AuthBy PORTLIMITCHECK for this, with your own 
queries to do the checking. You might also consider using the Client 
Identifier parameter, as you can then group multiple NAS's for your users.

hth

Hugh

-- 
Radiator: the most portable, flexible and configurable RADIUS server 
anywhere. Available on *NIX, *BSD, Windows 95/98/2000, NT, MacOS X.
-
Nets: internetwork inventory and management - graphical, extensible,
flexible with hardware, software, platform and database independence.

===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to