Hi,

I've been experimenting with freeRadius for 2 weeks now, but I still havent got it to do the following:

I need to expire a specific time (could be different for each account) after their first login. This time is listed in the MySQL database under the attribute "Max-All-Session" in seconds. The server has a MySQL backend which is working correctly.

I've tried the following methodes (they will be described in detail below):

  • sqlcounter
  • expireonlogin
  • allowedperiod

Unfortunately non of the above are working correctly. I will explain them in detail now:

sqlcounter
This is a basic module built in the "stock" version of freeradius. It calculated the maximum allowed time for an user account. Unfortunately it comes with 2 problems. The first (which sounds like a bug) is that on an account's first login it always shows (and calculates) a incorrect time of more the 400 hours remaining.
Secondly it stops counting when a user logs out, or time-outs (disconnects), so if a user re-connects it will continue at the remaining time the user had when it disconnected.

sqlcounter expire_on_login
I found this code on the net. It's supposed to calculate the remaining time and then write it as a Expire attribute in the database.
I included this code in the sql.conf file and added "expire_on_login" to the authorize section of the sites-available/default file.
I didn't see this script make any changes to the database.

sqlcounter accessperiod
I also found this script on the web: here and here. I included that code in the modules{} section, and added "accessperiod" to the sites-available/default file in the authorize section.
This code however did do something, it created a Expire record in the database, but one month from the first login, and not even exactly, but exactly at midnight, always!

I've been google-ing non-stop for days now, with the above result. I'd really appreciate any help. If you want to do some anonymously (private) you can PM, or add me on MSN, or Skype.
CuraHack Reviewed by CuraHack on . Help with RADIUS: Need accounts to expire a specific time after first login Hi, I've been experimenting with freeRadius for 2 weeks now, but I still havent got it to do the following: I need to expire a specific time (could be different for each account) after their first login. This time is listed in the MySQL database under the attribute "Max-All-Session" in seconds. The server has a MySQL backend which is working correctly. I've tried the following methodes (they will be described in detail below): sqlcounter Rating: 5