Title: Message
this seems to be an extremely popular question (I joined this list to ask this same question).....
 
Tom Emerson had replied with an excellent step-by-step procedure, and here it is (hope you don't mind Tom):
 
[TOM START]
the solution is to set up a "counter" with "reset=never".  I'm doing the same
thing [wireless hotspot, pre-paid "one hour" cards, etc.] and for the most
part the following seems to work for me:
 
[in modules]
        counter lifetime {
                filename        = ${raddbdir}/db.lifetime
                key             = User-Name
                count-attribute = Acct-Session-Time
                reset           = never
                counter-name    = lifetime-session-counter
                check-name      = lifetime-limit
                cache-size      = 5000
        }
 
[in instantiation]
        lifetime
 
[in authorize]
         ..
         sql
         lifetime
         ..
 
[in accounting]
         lifetime
 
[in the SQL database -- radgroupcheck]
     groupname: onehour
     attribute: lifetime-limit
     op:   :=
     value:   3600
 
[if you are using a "user file" instead of an SQL database, you would include
"lifetime-limit = 3600" in the check items part of an entry, i.e., the first
line of the entry]
 
users are associated with the "onehour" group via an entry in usergroup table,
though for a one-element group check item, you could simply put that item
into the radcheck table and not bother with a group...
 
BIG HUGE CAVEAT: the current production version (0.8.1) has a bug with
"reset=never" -- it resets when the program restarts.  This is fixed in the
CVS/development sources, so it should be in 0.9 [due to be released in like a
couple weeks or less, from what I hear...]
 
[TOM END]

 
 
 
-----Original Message-----
From: Igor Maciel Macaubas [mailto:[EMAIL PROTECTED]
Sent: June 26, 2003 11:10 PM
To: [EMAIL PROTECTED]
Subject: Accounting and Session-Timeout

Hello everybody,
 
I have here, up and running, a FreeRadius 0.8.1 server accessing a MySQL database to authenticate my users.
I have a table 'radreply', where I can define a custom radreply for each user. I'm using this for a quite easy thing: I'm replying with the default data a Session-Timeout, which is defined for each user.
What's going on: I have an user with the login 'igor', for example, and I've configured a Session-Timeout of 60 seconds (1 minute). After 1 minute, my RAS disconnects the user 'igor'. But if 'igor' authenticates again, he'll have 1 minute more.
I guess that I have to launch a database stored procedure or something like on the STOP event, to calculate the remaining time and write the right values on the right places.
Does anybody here have another way to do it? Have someone here ever did that?
Suggestions are welcome.
 
Regards,
Igor
--
[EMAIL PROTECTED]

Andrea Coppini
+356 79 ANDREA (263732)

[EMAIL PROTECTED]


EMPOWER PEOPLE - THE WORLD IN YOUR HAND

iWG (iWORLD GROUP) is a global e-mobile company creating, building and growing new businesses.  iWG founders are pioneers in creating multi-billion dollar mobile and Internet businesses in Europe, Asia and the US.

The Global Partners include the shareholders Bank of America, Deutsche Bank, Hikari Tsushin, McCaw, PaineWebber/UBS, The Dolphins' Trust, Perikles Trust and the iAA Advisory Network.

www.iWG.info
www.countryprofiler.com/iWG


Privileged/Confidential Information may be contained in this message.  If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email.

Reply via email to