That would give a user 30 days total.  They could take 6 months to use
it right?

If you're issuing a scratch type ticket I'm assuming it has a username
and password on it.  So you should already have those users in your
database.  If your accounting is working right, you could run a nightly
query to see what accounts don't have an expiration and then if those
accounts have ever logged in.  If they've logged in and don't have an
expiration, set the expiration for 30 days from the initial login.


Charlie

 

-----Original Message-----
From: Dustin Doris [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 17, 2004 6:25 AM
To: [EMAIL PROTECTED]
Subject: Re: 30Day Limit

Check out the rlm_sqlcounter module.  Read doc/rlm_sqlcounter.  In your
sqlcounter.conf file you can use something like this.

sqlcounter poolofminutes {
        counter-name = Max-All-Session-Time
        check-name = Max-All-Session
        sqlmod-inst = sql
        key = User-Name
        reset = never
        query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE
UserName='%{%k}'"
}

Then in your sql table, you'll add something like this for say user bob

insert into radcheck set UserName = 'bob', Attribute =
'Max-All-Session-Time', Value = '2592000', op = ':=';

This will insert the Max-All-Session-Time of 2592000 seconds
(30*24*60*60).


Hope that helps,

-Dusty Doris

On Tue, 17 Aug 2004, sarky wrote:

> Hi all
>
> I am using Mysql to do the restrictions.
>
> I want to do something like this:
> When a user logs in for the first time it will give a restriction of 
> 30days access time, i.e: logged on: 1st Jan 2004 then it expires 30th 
> Jan 2004
>
> Thank you
>
> Sarky
>
>
> -
> List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html
>

-
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to