reset sql counter every time user logged in

mohamed almeshal mohammed.almeshal at hotmail.com
Sun Dec 11 19:49:08 UTC 2022


dear Savers
I'm in middle of missy code , I need to expire the session every time the user is logged in , I do all my best but I found that best
way is to set max-all-session for the session and that will exipre the session every time and regenerate new session id ,
now my question is how to reset the sql counter every time the user is logged in

sqlcounter sql_session_timeout_never {
      sql_module_instance = sql

      counter_name = Max-All-Session-Time
      check_name = Max-All-Session
      reply_name = Session-Timeout
      key = User-Name
      reset = never

      query = "\
            SELECT IFNULL(SUM(AcctSessionTime),0) \
            FROM radacct \
            WHERE UserName='%{${key}}'"
}

I must set reset = ?

thanks , all


More information about the Freeradius-Users mailing list