Hello !

On Wed, 20 Sep 2000, Fernando Costa de Almeida wrote:
> I want to implement a time limited access to our dial service, so we
> will have two groups of users:
> 
>     1) Ilimited Access
>     2) 30 hours
> 
>     The users in the second group pay for the service and can spent 30
> hours of connection, after their access have to be denied. How can
> I implement this in Radius?
My advise is to create a column in your password database, containing state of
dialaccess (1 or 0). Making AuthSelect, check the state of this column for the
specified user and allow (1) or reject (0) his/her request for connection:
        SELECT ........... from passtable where username="U" and dialaccess=1.
All other requests with dialaccess=0 will be rejected.
In the Handler you should describe something like timebank for the user. You
can do it for your example by specifying the timebank for each user. After each
login session of the user you subtract from the timebank the meaning of 
%{Acct-Session-Time}, thus setting timebank to a new meaning. And don't forget
to set timebank=0 if %{Acct-Session-Time}>timebank.

Hope this helps :))

-- 
With regards,
Alexey A. Shavaldin                              [EMAIL PROTECTED]
--------------------
System Administrator
of Kraft-S, JSC

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