Re: rlm_sqlcounter is not working

2004-04-13 Thread Milver S. Nisay
now i am done with your config. i did some tweaks and work around.
it is working now with my test bed FC1 box. have made changes to it,
 the authentication was based from system,
 number of hours is still with MySQL
 session ids is with flat file still,but accounting session is with MySQL
still.
 no specific user and group to manipulate.
 and it is working fine, the radius is rejecting an exceeded user,
but i have not test if the user will be kicked out if the below condition is
both met:
   a. currently log in
   b. currently exceeding number of hours
i cannot test it because i do not have outside call access here, but based
from the
radiusd -X log, it is rejecting it, i hope kicking works here...give me time
till tommorrow to
test the kicking feature again. i have to do it outside the company..



- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 12, 2004 3:31 PM
Subject: Re: rlm_sqlcounter is not working


>
> is counter reset the port from terminal server when the Max-Session-Time
> finished.
>
> i have seen that when the Max-Session-Time finished counter just reset the
time
> but it doesnt reset the port from terminal server is there any way to do
it. or
> do i have to use other script to resetting the port from terminal server?
>
> waiting for your reply
>
> thanks and regards
>
> Mainul Islam Mithu
> System Manager
>
> Quoting Keith Yoder <[EMAIL PROTECTED]>:
>
> > [EMAIL PROTECTED] escreveu:
> >
> > >sqlcounter monthlycounter {
> > >counter-name = Monthly-Session-Time
> > >check-name = Max-Monthly-Session
> > >sqlmod-inst = sqlcca3
> > >
> > >
> > Change that last line to:
> > sqlmod-inst = sql
> >
> > There was a problem in the example file.  I think it's been fixed in the
> > CVS head.  I once did the same thing :)
> >
> > -
> > List info/subscribe/unsubscribe? See
> > http://www.freeradius.org/list/users.html
> >
> >
>
>
>
>
> -
> This mail sent through IMP: http://mail.accesstel.net/
>
>
>
> -
> List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html
>
>



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


Re: rlm_sqlcounter is not working

2004-04-12 Thread Alan DeKok
[EMAIL PROTECTED] wrote:
> is counter reset the port from terminal server when the Max-Session-Time
> finished.

  No.  The counter module tells the NAS to log the user off at that time.

  If the user isn't being logged off, then it's the fault of the NAS.

  Alan DeKok.

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


Re: rlm_sqlcounter is not working

2004-04-12 Thread mithu

is counter reset the port from terminal server when the Max-Session-Time 
finished.

i have seen that when the Max-Session-Time finished counter just reset the time 
but it doesnt reset the port from terminal server is there any way to do it. or 
do i have to use other script to resetting the port from terminal server?

waiting for your reply

thanks and regards

Mainul Islam Mithu
System Manager

Quoting Keith Yoder <[EMAIL PROTECTED]>:

> [EMAIL PROTECTED] escreveu:
> 
> >sqlcounter monthlycounter {
> >counter-name = Monthly-Session-Time
> >check-name = Max-Monthly-Session
> >sqlmod-inst = sqlcca3
> >  
> >
> Change that last line to:
> sqlmod-inst = sql
> 
> There was a problem in the example file.  I think it's been fixed in the 
> CVS head.  I once did the same thing :)
> 
> - 
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
> 
> 




-
This mail sent through IMP: http://mail.accesstel.net/



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


Re: rlm_sqlcounter is not working

2004-04-10 Thread Keith Yoder
[EMAIL PROTECTED] escreveu:

sqlcounter monthlycounter {
   counter-name = Monthly-Session-Time
   check-name = Max-Monthly-Session
   sqlmod-inst = sqlcca3
 

Change that last line to:
sqlmod-inst = sql
There was a problem in the example file.  I think it's been fixed in the 
CVS head.  I once did the same thing :)

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


rlm_sqlcounter is not working

2004-04-10 Thread mithu


Dear All

I am running freeradius-0.9.3 at my redhat 9 machine. rlm_sqlcounter module is 
also installed. at radius log shows that module is successfully loaded.
Sat Apr 10 13:53:43 2004 : Info: rlm_sql (sql): Driver rlm_sql_mysql (module 
rlm_sql_mysql) loaded and linked

but seems to me rlm_sqlcounter is not working properly.
counter is not resetting the user as well as not rejecting though his maximum 
sessiontime has been finished. So whats wrong with my configuration. Can anyone 
help me out of this problem.


I have put attribte at my mysql database

mysql> select * from radcheck where username='testshuvo';

| id   | UserName  | Attribute   | Value | op |
+--+---+-+---++
| 6471 | testshuvo | User-Password   | 12345  | := |
| 6476 | testshuvo | Max-All-Session | 11000 | := |
+--+---+-+---++

here is my configuration files

#/etc/raddb/sqlcounter.conf


#-#
sqlcounter noresetcounter {
counter-name = Max-All-Session-Time
check-name = Max-All-Session
sqlmod-inst = sql
key = User-Name
reset = never

query = "Select sum(AcctSessionTime) from radacct where 
username='%(%k)'"
}
sqlcounter dailycounter {
driver = "rlm_sqlcounter"
counter-name = Daily-Session-Time
check-name = Max-Daily-Session
sqlmod-inst = sqlcca3
key = User-Name
reset = daily

query = "SELECT SUM(AcctSessionTime - GREATEST((%b - 
UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' AND 
UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"

}

sqlcounter monthlycounter {
counter-name = Monthly-Session-Time
check-name = Max-Monthly-Session
sqlmod-inst = sqlcca3
key = User-Name
reset = monthly

query = "SELECT SUM(AcctSessionTime - GREATEST((%b - 
UNIX_TIMESTAMP(AcctStartTime)), 0)) FROM radacct WHERE UserName='%{%k}' AND 
UNIX_TIMESTAMP(AcctStartTime) + AcctSessionTime > '%b'"

}

#-#


#/etc/raddb/radiusd.conf


prefix = /usr
exec_prefix = /usr
sysconfdir = /etc
localstatedir = /var
sbindir = /usr/sbin
logdir = ${localstatedir}/log/radius
raddbdir = ${sysconfdir}/raddb
radacctdir = ${logdir}/radacct
confdir = ${raddbdir}
run_dir = ${localstatedir}/run/radiusd
log_file = ${logdir}/radius.log
libdir = /usr/lib
pidfile = ${run_dir}/radiusd.pid


user = radiusd
group = radiusd

max_request_time = 30
delete_blocked_requests = no
cleanup_delay = 5
max_requests = 1024
bind_address = *
port = 0
hostname_lookups = no
allow_core_dumps = no
regular_expressions = yes
extended_expressions= yes
log_stripped_names = no
log_auth = no
log_auth_badpass = no
log_auth_goodpass = no
usercollide = no
lower_user = no
lower_pass = no
nospace_user = no
nospace_pass = no

checkrad = ${sbindir}/checkrad

security {
max_attributes = 200
reject_delay = 1
status_server = no
}

proxy_requests  = yes
$INCLUDE  ${confdir}/proxy.conf
$INCLUDE  ${confdir}/clients.conf
snmp= no
$INCLUDE  ${confdir}/snmp.conf


thread pool {
start_servers = 5
max_servers = 32
min_spare_servers = 3
max_spare_servers = 10
max_requests_per_server = 0
}

modules {
$INCLUDE  ${confdir}/sqlcounter.conf

pap {
encryption_scheme = crypt
}

chap {
authtype = CHAP
}

pam {
pam_auth = radiusd
}

unix {
cache = no
cache_reload = 600
#passwd = /etc/passwd
shadow = /etc/shadow
#group = /etc/group
radwtmp = ${logdir}/radwtmp
}

eap {
default_eap_type = md5
timer_expire = 60

md5 {
}

leap {
}
}

mschap {
authtype = MS-CHAP
}


realm realmslash {
format = prefix
delimiter = "/"
}

realm suffix {
format = suffix
delimiter = "@"
}

realm realmpercent {
format = suffix
delimiter = "%"
}

preprocess {
huntgroups = ${confdir}/huntgroups
hints = ${confdir}/hints
with_ascend_hack = no
ascend_channels_per_line = 23
with_ntdomain_hack = no
with_specialix_jetstream_hack = no
with_cisco_vsa_hack = no
}
files {