[EMAIL PROTECTED] wrote:
>
> Do-Risika RAFIEFERANTSIARONJY <[EMAIL PROTECTED]> wrote:
> > With rlm_counter, can i have the counter's value on a given moment ? if
> > yes, how ?
>
> Yes. Read the comments for the module in 'radiusd.conf'.
OK, What i want to ask is if i have a daily counter time with
'Acct-Session-Time' as count-attribute, 'Daily-Session-Time' as
counter-name, how can i check from the counter file (for example
${raddbdir}/daily.counter) the state of the counter for one user (for
example a user had xxx seconds connexions during the day), because i
noticed that the counter file is not a simple text file, i.e what i need
is : 'how much times have been consumed by/remain to a user on a given
moment ?'
I put below the rlm_counter's comments in the radiusd.conf but i did not
find the answer, and here after my example of config :
...
# This module takes an attribute (count-attribute), which MUST
# be an 'integer' or 'time' attribute. It also takes a key,
# and creates a counter for each unique key. The count is
# incremented when accounting packets are received by the
# server. The value of the increment is the value of the
# count-attribute.
#
# The 'reset' parameter defines when the counters are all reset
to
# zero. It can be hourly, daily, weekly, or monthly.
#
# The counter-name is the name of the attribute in the 'users'
# file used to access that counter. e.g.
#
# DEFAULT Daily-Session-Time > 3600, Auth-Type = Reject
# Reply-Message = "You've used up more than one hour today"
counter daily_counter {
filename = ${raddbdir}/daily.counter
key = User-Name
count-attribute = Acct-Session-Time
reset = daily
counter-name = Daily-Session-Time
check-name = Max-Daily-Session-Time
allowed-servicetype = Framed-User
cache-size = 5000
}
...
I use mysql for authentication/accounting.
Thanx in advance,
@+
--
DouRiX
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html