Sql Counter ?
try to run radiusd in debugging mode ... it will show the next reset ... in your case this will be reset @ first day of december. = wilfredo pahilanga apellido jr. technical support mactan online bacolod city, philippines +63 34 4348311 If you can't hear me, it's because i'm in parentheses. __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Sql Counter ?
How Sql Counter reset account expiration date ? emm ... Example : user first connection is 12 Nov 2003 , sql counter (mountly max session) will be reset on 12 Dec or 1 dec ? is it reset every mount or after 30 day of activitation ? -- It's a poor workman who blames his tools. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: ask about SQL Counter disconnect dialup users
Sorry, I had not so much time now. If i shall have a little more time i'll write faq about how to install freeradius + mysql + cisco for ppp users + voip. Now i should connect freeradius with MSSQL2000. And let it be... Cheers, SaLiK. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: SQL Counter disconnect dialup users
Hi all! Sorry for stupid question. I found the cause, it was in cisco config. There were no line in async interface: dialer in-band Cheers, SaLiK. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
SQL Counter disconnect dialup users
Hi all! I have latest freeradius snapshot (23.06.2003) and mysql as backend. At start i had problem with limiting the time of dialup users. After few changes in sql.conf and cisco configuration everything seems fine and user cannot login when AcctSessionTime in radacct is more then i defined in radgroupcheck (Max-All-Session := 120). BUT user is not disconnecting when the time for him is over :) Cisco some config: aaa accounting update periodic 1 sql.conf: sqlcounter noresetcounter { counter-name = Max-All-Session-Time check-name = Max-All-Session sqlmod-inst = sql key = User-Name reset = never reply = "The limit of your prepaid account has been reached!" query = "SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{%k}'" } Looked for debug output of freeradius (./radiusd -X) and noticed that packets from cisco arived and they are have being checked by sql module in accounting {} session. If I include noresetcounter in accounting session then i recieve error: "SQL Counter" modules aren't allowed in 'accounting' sections -- they have no such method. And by my thoughts i have only two ways after that error: 1. Using rlm_perl or rlm_python and disconnecting users via snmp 2. Looking in sql module and righting some stored procedures? Any opinions? Cheers, SaLiK. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
sql counter problem
I try to use this module but the debug wirte: rlm_sql (sql): Released sql socket id: 4 modcall[authorize]: module "sql" returns ok rlm_sqlcounter: Entering module authorize code rlm_sqlcounter: Could not find Check item value pair modcall[authorize]: module "noresetcounter" returns noop rlm_sqlcounter: Entering module authorize code rlm_sqlcounter: Could not find Check item value pair modcall[authorize]: module "dailycounter" returns noop rlm_sqlcounter: Entering module authorize code rlm_sqlcounter: Could not find Check item value pair modcall[authorize]: module "monthlycounter" returns noop modcall: group authorize returns ok What does it means : "rlm_sqlcounter: Could not find Check item value pair" I have had the same problem with counter. TEB! - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: sql counter xlat problem
Malcolm Caldwell <[EMAIL PROTECTED]> wrote: > I found a bug that stoped sqlcounters working for me. > > Basically sql_xlat in rlm_sql is doing > rlm_sql_select_query(sqlsocket,ins... > ... > rlm_sql_fetch_row(sqlsocket, inst) > (inst->module->sql_finish_select_query)(sqlsocket, inst->config); > ... > row = sqlsocket->row; > > The problem is sqlsocket->row is freed by sql_finish_select. > > Below is a patch to fix this. It is against snapshot from 20021104. Added, thanks. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re[2]: sql counter xlat problem
> I found a bug that stoped sqlcounters working for me. >>I am trying to use sqlcounter and oracle to implement download... May be this problem is specific to oracle driver (sql_oracle.c)? - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
re: sql counter xlat problem
OK, I found a bug that stoped sqlcounters working for me. Basically sql_xlat in rlm_sql is doing rlm_sql_select_query(sqlsocket,ins... ... rlm_sql_fetch_row(sqlsocket, inst) (inst->module->sql_finish_select_query)(sqlsocket, inst->config); ... row = sqlsocket->row; The problem is sqlsocket->row is freed by sql_finish_select. Below is a patch to fix this. It is against snapshot from 20021104. I checked cvs and this does not seem to fixed. --- rlm_sql.c.20021104 Mon Nov 11 11:52:25 2002 +++ rlm_sql.c Mon Nov 11 12:02:04 2002 @@ -136,39 +136,42 @@ return 0; } ret = rlm_sql_fetch_row(sqlsocket, inst); - (inst->module->sql_finish_select_query)(sqlsocket, inst->config); if (ret) { DEBUG("rlm_sql: SQL query did not succeed"); + (inst->module->sql_finish_select_query)(sqlsocket, inst->config); sql_release_socket(inst,sqlsocket); return 0; } row = sqlsocket->row; if (row == NULL) { DEBUG("rlm_sql: SQL query did not return any results"); + (inst->module->sql_finish_select_query)(sqlsocket, inst->config); sql_release_socket(inst,sqlsocket); return 0; } if (row[0] == NULL){ DEBUG("rlm_sql: row[0] returned NULL"); + (inst->module->sql_finish_select_query)(sqlsocket, inst->config); sql_release_socket(inst,sqlsocket); return 0; } ret = strlen(row[0]); if (ret > freespace){ DEBUG("rlm_sql: sql_xlat:: Insufficient string space"); + (inst->module->sql_finish_select_query)(sqlsocket, inst->config); sql_release_socket(inst,sqlsocket); return 0; } strncpy(out,row[0],ret); DEBUG("rlm_sql: - sql_xlat finished"); - + (inst->module->sql_finish_select_query)(sqlsocket, inst->config); sql_release_socket(inst,sqlsocket); return ret; } >Hello, > >I am trying to use sqlcounter and oracle to implement download >limits/quotas. > >I have: >sqlcounter testquota { > counter-name = Test-Quota-Input-Octets > check-name = Test-Quota > sqlmod-inst = sql > key = User-Name > reset = daily > > query = "SELECT SUM(acctinputoctets) FROM radacct WHERE >UserName='%{%k}'" > } > >And: >DEFAULT User-Name =~ "^s[0-9]+$", Test-Quota-Input-Octets > 1000, Auth-Type = Reject > Reply-Message = "You have used up your quota" > > >Output with -XX I get: >sqlcounter_expand: 'SELECT SUM(acctinputoctets) FROM radacct WHERE >UserName='%{User-Name}'' >radius_xlat: 'SELECT SUM(acctinputoctets) FROM radacct WHERE UserName='s11'' >sqlcounter_expand: '%{sql:SELECT SUM(acctinputoctets) FROM radacct WHERE >UserName='s11'}' >radius_xlat: Running registered xlat function of module sql for string 'SELECT >SUM(acctinputoctets) FROM radacct WHERE UserName='s11'' >rlm_sql: - sql_xlat >radius_xlat: 'SELECT SUM(acctinputoctets) FROM radacct WHERE UserName='s11'' >rlm_sql: Reserving sql socket id: 4 >SELECT SUM(acctinputoctets) FROM radacct WHERE UserName='s11' >rlm_sql: - sql_xlat finished >rlm_sql: Released sql socket id: 4 >radius_xlat: >'?ì???ß?@È~??È~??°ß?@°ß?@¸ß?@¸ß?@Àß?@Àß?@Èß?@Èß?@x~??x~??Øß?@Øß?@àß?@àß?@èß?@èß?@ðß?@ðß?@øß?@øß?@' > >This is then repeated a few times. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
sql counter xlat problem
Hello, I am trying to use sqlcounter and oracle to implement download limits/quotas. I have: sqlcounter testquota { counter-name = Test-Quota-Input-Octets check-name = Test-Quota sqlmod-inst = sql key = User-Name reset = daily query = "SELECT SUM(acctinputoctets) FROM radacct WHERE UserName=' %{%k}'" } And: DEFAULT User-Name =~ "^s[0-9]+$", Test-Quota-Input-Octets > 1000, Auth-Type = Reject Reply-Message = "You have used up your quota" Output with -XX I get: sqlcounter_expand: 'SELECT SUM(acctinputoctets) FROM radacct WHERE UserName='%{User-Name}'' radius_xlat: 'SELECT SUM(acctinputoctets) FROM radacct WHERE UserName='s11'' sqlcounter_expand: '%{sql:SELECT SUM(acctinputoctets) FROM radacct WHERE UserName='s11'}' radius_xlat: Running registered xlat function of module sql for string 'SELECT SUM(acctinputoctets) FROM radacct WHERE UserName='s11'' rlm_sql: - sql_xlat radius_xlat: 'SELECT SUM(acctinputoctets) FROM radacct WHERE UserName='s11'' rlm_sql: Reserving sql socket id: 4 SELECT SUM(acctinputoctets) FROM radacct WHERE UserName='s11' rlm_sql: - sql_xlat finished rlm_sql: Released sql socket id: 4 radius_xlat: '?ì???ß?@È~??È~??°ß?@°ß?@¸ß?@¸ß?@Àß?@Àß?@Èß?@Èß?@x~??x~??Øß?@Øß?@à ß?@àß?@èß?@èß?@ðß?@ðß?@øß?@øß?@' This is then repeated a few times. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Re: Please HELP ME..can do Session TimeOut for Replace sql counter ?,
Gumilar Satriawan <[EMAIL PROTECTED]> wrote: > Alternatifely use Rlm_sqlcounter, But It intend not > for each user account balance but For Each Group > Defined in daily, weekly, etc.., 9 ( I have to > modified in long time ). I need For each users > can have Account Balance (Time Duration) and then > RADIUS system can Forcing disconnect POrtslave modem > if their used time expire ( may be use > PW_SESSION_TIME or ??? ) Have you looked at rlm_counter? It does exactly what you want. Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Please HELP ME..can do Session TimeOut for Replace sql counter ?,
Hi all, Guru.. I am configuring FreeRadius Server 07 and Portslave 2001-01-19 for internet prepaid in my campuss My problem is difficult disconnect users while their login to RADIUS. I have Idea to count for each session time use Session Time Out While user Logging on, But I am not sure it will working fine.. Alternatifely use Rlm_sqlcounter, But It intend not for each user account balance but For Each Group Defined in daily, weekly, etc.., 9 ( I have to modified in long time ). I need For each users can have Account Balance (Time Duration) and then RADIUS system can Forcing disconnect POrtslave modem if their used time expire ( may be use PW_SESSION_TIME or ??? ) Thank In Advanced Gumilar Satriawan __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Please HELP ME..can do Session TimeOut for Replace sql counter ?,
Hi all, My Guru.. I am configuring FreeRadius Server 06 and Portslave 2001-01-19 for internet prepaid.. My problem is difficult disconnect users while their login to RADIUS. I have Idea to count for each session time use Session Time Out While user Logging on, But I am not sure it will working fine.. Alternatifely use Rlm_sqlcounter, But It intend not for each user account balance but For Each Group Defined in daily, weekly, etc.., 9 ( I have to modified in long time )I need For each users can have Account Balance ( Time Duration) and then system RADIUS can Forcing disconnect POrtslave modem if User account expired.. Please Help Me.. GURUs, mainly for Mr.Alan and Mr. Chris ... Thank In Advanced Gumilar Satriawan __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html