Freeradius "Expire-After" How To .. ?

Russell Mike radius.sir at gmail.com
Tue Apr 2 14:40:25 CEST 2013


Thanks Muhammed,

Expiration module (Attribute) works for me already, if i want to expie a
account on the calendar date. it does the job just fine. i need to expire
the account after 90 days but count must start after first login.
Your help is appreciated / Thanks


On Tue, Apr 2, 2013 at 9:58 AM, Muhammad Nuzaihan bin Kamal Luddin <
muhammad at taqisystems.com> wrote:

> Hi,
>
> Have you tried "expiration" module?
>
> sqlcounter expiration {
>                count-attribute = "Acct-Session-Time"
>                counter-name = "Max-Allowed-Session"
>                check-name = "Expiration"
>                sqlmod-inst = "sql"
>                key = "User-Name"
>                reset = "never"
>                query = "SELECT IFNULL(TIME_TO_SEC(TIMEDIFF(NOW(), \
>                  MIN(AcctStartTime))),0) FROM radacct WHERE \
>                  UserName='${key}' ORDER BY AcctStartTime LIMIT 1;"
> }
>
> of course you have to put "expiration" (without quotes) in:
>
> instantiate portion of radiusd.conf
> accounting section of sql.conf (or sites-available/default file in
> debian)
>
> You may have to add "Expiration" in the check attributes as well.
>
>
> From what i have looked within daloradius code, you will need to set the
> time settings in "Plan".
>
> Regards,
> Muhammad Nuzaihan Bin Kamal Luddin
>
> On Mon, 2013-04-01 at 17:12 +0000, Russell Mike wrote:
> > Hi List,
> >
> >
> > i need to expire the prepaid card after three months of first login.
> > after reading mail achieves, i was able to figured out that i need to
> > use "Expire-After"  FR attribute and value in seconds. i was bit of
> > unclear how to bring the module in to the action because i am unable
> > to locate "Expire-After" attribute to users (Through Daloradius).
> > Someone please help ...
> >
> >
> > # Default Module Came With FR v2.2
> >
> >
> > sqlcounter expire_on_login {
> >         counter-name = Expire-After-Initial-Login
> >         check-name = Expire-After
> >         sqlmod-inst = sql
> >         key = User-Name
> >         reset = never
> >         query = "SELECT TIME_TO_SEC(TIMEDIFF(NOW(), acctstarttime)) \
> >                  FROM radacct \
> >                  WHERE UserName='%{${key}}' \
> >                  ORDER BY acctstarttime \
> >                  LIMIT 1;"
> > }
> >
> >
> >
> >
> > Thanks / Regards
> >
> >
> > RM --
> > -
> > List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20130402/a9ab843e/attachment.html>


More information about the Freeradius-Users mailing list