I'm using freeradius version 1.1.7 under FC8 with phpmyprepaid.  I also would like to have 3-day accounts expire exactly 3 days after the first login.  I follow the instruction found at http://www.warungdigital.com/freeradius-limit-user-access-by-period-started-from-activation-time.htm, but after I restart the server (using service radiusd restart) I have the following error:
Fri May 22 23:10:48 2009 : Error: /etc/raddb/radiusd.conf[1563]: Line is not in 'attribute = value' format
Fri May 22 23:10:48 2009 : Error: Errors reading radiusd.conf
What should I do?
Please see the related part of my radius.conf below:
in the module part:
------------
       sqlcounter accessperiod {
               counter-name = Max-Access-Period-Time
               check-name = Access-Period
               sqlmod-inst = sql
               key = User-Name
               reset = never
               query = "SELECT UNIX_TIMESTAMP() - UNIX_TIMESTAMP(AcctStartTime) FROM radacct \
               WHERE UserName = '%{%k}' LIMIT 1"
       }
-----------
in the authorization part:
-----------
        #
        # As of 1.1.4, you should list "pap" last in this section.
        # See "man rlm_pap" for more information.
        pap
noresetcounter
dailycounter
monthlycounter
accessperiod
}
----------
I have also added the following in the /etc/raddb/dictionary
ATTRIBUTE Access-Period 3000 integer
in radcheck table of mySQL database:
id          |  UserName   |  Attribute          |op |     Value
28003    |    3d               |  Access-Period   |:=  |    259200
28004    |    3d               |  User-Password  |:=  |    3d