Freeradius "Expire-After" How To .. ?
Muhammad Nuzaihan bin Kamal Luddin
muhammad at taqisystems.com
Tue Apr 2 11:58:44 CEST 2013
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
More information about the Freeradius-Users
mailing list