I am trying to set up a counter to be able to disable a particular
account(s) after a certain amount of time used in a month. I've looked at
the docs and scanned through the list archives, but can't seem to get it
working. Note that the plan is to have this counter reset monthly, but for
testing I have it set to daily reset... I also have the counters set
artificially low for testing, also note that this server is still running
freeradius 0.5 (upgrade is planned as soon as we can run the newest version
through our test server).
I have tried both this syntax (from the sample in the radiusd.conf from
0.5)...
test Monthly-Session-Time > 120, Auth-Type = Reject
Reply-Message = "Monthly time limit exceeded."
and this one from more recent documentation...
test Monthly-Session-Time > 120, Auth-Type := Reject
Reply-Message = "Monthly time limit exceeded."
The first example allows the user to log in all the time, the second never
allows them to log in :-( The db.counter file seems to be getting created
and seems to have data in it. Which of the two is the proper syntax for the
users file, and is there something I've missed in the configuration that
could be causing this not to work?
The relevant bits from my radiusd.conf follow...
counter {
filename = ${raddbdir}/db.counter
key = User-Name
count-attribute = Acct-Session-Time
reset = daily
counter-name = Monthly-Session-Time
check-name = Max-Monthly-Session
allowed-servicetype = Framed-User
cache-size = 5000
}
instantiate {
counter
}
authorize {
preprocess
counter
suffix
files
}
accounting {
acct_unique
detail
counter
unix
radutmp
}
Also wondering if it is possible to have two counters set up using this
method, ideally we would like one set of counters reset daily, and one
monthly. Any input is appreciated.
Thanks,
>>>>> Mike <<<<<
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html