Another "package" - set expiry at first use
I have another question about implementing another "package" :- Upon successful authentication, check it is firstuse. If yes, set expiry to say 6 months from now. Any advise how to implement this at the radius server ? My first cut thinking will be check 'radacct' for existence of any past usage records. If yes, set expiry 5 months from now. Anyone already has a mysql script written for this ? Regards
Upon successful authentication, check it is firstuse. If yes, set expiry to say 6 months from now.
Use unlang in post-auth: check that there is no session for that user in radacct; if none, put adddate(now(),INTERVAL 6 MONTH) into Tmp-String-0; if you want to keep it in unlang (don't want to write a perl script) you need to convert that from mysql time (yyyy-MM-dd HH:mm:ss) to Month dd yyyy HH:mm:ss using mysql time functions (+ concat()) and store it in Tmp-String-1; then insert Tmp-String-1 as Expiration value for that user in radcheck. Ivan Kalik Kalik Informatika ISP
participants (2)
-
Ivan Kalik -
Ming-Ching Tiew