Hi,
I'm using Free Radius and need to set up monthly time limits of 200
hours/month/user. I have read rlm_counter in radiusd.conf, and even though
I'm not sure how well I understand this, I've proceeded to try to set it up.
Here's what I've done. In radiusd.conf:
counter monthly {
filename = ${raddbdir}/db.monthly
key = User-Name
count-attribute = Acct-Session-Time
reset = monthly
counter-name = Monthly-Session-Time
check-name = Max-Monthly-Session
allowed-servicetype = Framed-User
cache-size = 5000
}
In Instantiation I have:
instantiate {
expr
monthly
}
In authorize I have:
authorize {
preprocess
eap
suffix
files
mschap
monthly
}
In accounting I have:
accounting {
acct_unique
detail
monthly
unix # wtmp file
radutmp
}
In my users file I have each user listed as a separate entry. Example:
lisa Auth-Type == Local, Password == c57bl6j
Service-Type = Framed-User,
Framed-Protocol = PPP,
Framed-IP-Address = 255.255.255.254,
Framed-IP-Netmask = 255.255.255.255,
Framed-Routing = None,
Framed-Compression = None,
Framed-MTU = 1500
So at the top of the users file I added this:
DEFAULT Monthly-Session-Time > 720000, Auth-Type := Reject
Reply-Message = "You've used up your allocated monthly time.",
Fall-Through = No
Now when I restart Free Radius I get this error message:
Fri Jan 23 14:10:33 2004 : Error: radiusd.conf[1160] Failed to link to
module 'rlm_counter': file not found
What have I done, or not done, or failed to understand??
Thanks,
Lisa Casey
Netlink 2000, Inc.
PS - One question I do have is about the db.monthly file. Is this something
I need to create or will it be created automatically whenever I get this
working?
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html