At 07:32 PM 5/21/2002 -0300, you wrote:
>Hi, I just upgraded Freeradius 0.5 to freeradius-snapshot-20020521.
>I altered the old radiusd.conf file to reflect some changes, and have
>included SQLcounter module. I wish to limit access to users on a
>three-month basis, but only some users, and this 3-month time is
>individual.
>
>What I did:
>Raidusd.conf
>         sqlcounter monthlycounter {
>                 counter-name = Monthly-Session-Time
>                 check-name = Max-Monthly-Session
>                 sqlmod-inst = sql
>                 key = User-Name
>                 reset = 3m
>}
>authorize {
>         preprocess
>         suffix
>         monthlycounter
>         sql
>         monthlycounter
>}

Since you are defining your Check Item in your SQL database, you should not 
need to include 'monthlycounter' twice.  The copy *after* sql is the only 
one you should need.


>accounting {
>         acct_unique
>         sql
>         radutmp
>}
>
>The user can log ok if there's nothing on table radcheck about Monthly 
>Sessions. But if I
>insert a row like
>username=surak
>attribute=Max-Monthly-Session
>value= 2000000  (Any)
>op=   ":=" without quotes, obviosly

This looks fine.


>The radius rejects the user with the following message on debug:
>modcall: entering group authorize
>   modcall[authorize]: module "preprocess" returns ok
>     rlm_realm: Looking up realm NULL for User-Name = "surak"
>     rlm_realm: No such realm NULL
>   modcall[authorize]: module "suffix" returns noop
>rlm_sqlcounter: Entering module authorize code
>rlm_sqlcounter: Could not find Check item value pair
>   modcall[authorize]: module "monthlycounter" returns noop

Since you called 'monthlycounter' twice, it should appear twice in the 
debug output.  The first time should appear just as it does above because 
the check item has not yet been read from your SQL database.  But you don't 
include the logs for the second call.  Did they appear?  If so what do they 
indicate?


Randy Moore
Axion Information Technologies, Inc.

email     [EMAIL PROTECTED]
phone   301-408-1200
fax        301-445-3947


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to