27 Nov
2008
27 Nov
'08
7:42 a.m.
Hi, i needed to expire an account x seconds after its initial login/first session start. I came up with this solution using the sqlcounter module. Maybe this is of interest to others and could go into the docs. This uses mysql. sqlcounter expirelogincounter { 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='%{%k}' \ ORDER BY acctstarttime \ LIMIT 1;" } Regards Stephan -- Stephan Jaeger <stephan.jaeger@ewetel.de> EWE TEL GmbH