<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#3366ff" bgcolor="#ffffff">
Hi Alan,<br>
<br>
Did you managed to look into the issue ?<br>
<br>
or maybe any hints on how to use DATETIME in Expiration instead of
String ?<br>
<br>
Regads<br>
Suman<br>
<br>
On 3/15/2011 4:04 PM, Suman Dash wrote:
<blockquote cite="mid:4D7F40C9.2000602@clydontech.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Dear Alan,<br>
<br>
I have not removed any debug messages. I will try to put
everything once again . I was not aware that i sent you a mail. I
am having a nightmare and accidently i clicked Send All instead of
selecting the mailing list. <br>
<br>
sqlcounter monthlycounter {<br>
counter-name = Monthly-Session-Time<br>
check-name = Max-Monthly-Session<br>
reply-name = Session-Timeout<br>
sqlmod-inst = sql<br>
key = User-Name<br>
reset = never<br>
<br>
query = "SELECT SUM(acctsessiontime) FROM tbl_acct where \<br>
username = '%{%k}' AND acctstarttime BETWEEN \<br>
(SELECT STR_TO_DATE((SELECT value FROM tbl_check \<br>
WHERE username = '%{%k}' AND attribute =
'Activation'), '%%%%d %%%%M %%%%Y %%%%H:%%%%i:%%%%s')) \<br>
AND (SELECT STR_TO_DATE((SELECT value FROM
tbl_check WHERE username = '%{%k}' \<br>
AND attribute = 'Expiration'), '%%%%d %%%%M %%%%Y
%%%%H:%%%%i:%%%%s'))"<br>
}<br>
<br>
<br>
DEBUG <br>
<br>
Listening on authentication address * port 1812<br>
Listening on accounting address * port 1813<br>
Listening on proxy address * port 1814<br>
Ready to process requests.<br>
rad_recv: Access-Request packet from host 122.175.85.117 port
21658, id=10, length=59<br>
User-Name = "suman"<br>
User-Password = "duman12"<br>
Calling-Station-Id = "001122334455"<br>
+- entering group authorize {...}<br>
++[preprocess] returns ok<br>
++[chap] returns noop<br>
++[mschap] returns noop<br>
[suffix] No '@' in User-Name = "suman", looking up realm NULL<br>
[suffix] No such realm "NULL"<br>
++[suffix] returns noop<br>
[eap] No EAP-Message, not doing EAP<br>
++[eap] returns noop<br>
++[unix] returns notfound<br>
++[files] returns noop<br>
[sql] expand: %{User-Name} -> suman<br>
[sql] sql_set_user escaped user --> 'suman'<br>
rlm_sql (sql): Reserving sql socket id: 3<br>
[sql] expand: SELECT id, username, attribute, value,
op FROM tbl_check WHERE username =
'%{SQL-User-Name}' ORDER BY id -> SELECT id,
username, attribute, value, op FROM tbl_check
WHERE username = 'suman' ORDER BY id<br>
[sql] User found in radcheck table<br>
[sql] expand: SELECT id, username, attribute, value,
op FROM tbl_reply WHERE username =
'%{SQL-User-Name}' ORDER BY id -> SELECT id,
username, attribute, value, op FROM tbl_reply
WHERE username = 'suman' ORDER BY id<br>
[sql] expand: SELECT groupname FROM
tbl_usergroup WHERE username =
'%{SQL-User-Name}' ORDER BY priority -> SELECT
groupname FROM tbl_usergroup WHERE username =
'suman' ORDER BY priority<br>
[sql] expand: SELECT id, groupname, attribute, Value,
op FROM tbl_groupcheck WHERE groupname =
'%{Sql-Group}' ORDER BY id -> SELECT id, groupname,
attribute, Value, op FROM
tbl_groupcheck WHERE groupname = 'Biz1Mbps-UL'
ORDER BY id<br>
[sql] User found in group Biz1Mbps-UL<br>
[sql] expand: SELECT id, groupname, attribute, value,
op FROM tbl_groupreply WHERE groupname =
'%{Sql-Group}' ORDER BY id -> SELECT id, groupname,
attribute, value, op FROM
tbl_groupreply WHERE groupname = 'Biz1Mbps-UL'
ORDER BY id<br>
rlm_sql (sql): Released sql socket id: 3<br>
++[sql] returns ok<br>
rlm_sqlcounter: Entering module authorize code<br>
rlm_sqlcounter: Could not find Check item value pair<br>
++[dailycounter] returns noop<br>
rlm_sqlcounter: Entering module authorize code<br>
sqlcounter_expand: 'SELECT SUM(acctsessiontime) FROM tbl_acct
where username = '%{User-Name}' AND acctstarttime
BETWEEN (SELECT STR_TO_DATE((SELECT value FROM
tbl_check WHERE username = '%{User-Name}' AND
attribute = 'Activation'), '%0%0d %0%0M %0%0Y
%0%0H:%0%0i:%0%0s')) AND (SELECT
STR_TO_DATE((SELECT value FROM tbl_check WHERE username =
'%{User-Name}' AND attribute = 'Expiration'),
'%0%0d %0%0M %0%0Y %0%0H:%0%0i:%0%0s'))'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] expand: SELECT SUM(acctsessiontime) FROM
tbl_acct where username = '%{User-Name}' AND
acctstarttime BETWEEN (SELECT STR_TO_DATE((SELECT
value FROM tbl_check WHERE username =
'%{User-Name}' AND attribute = 'Activation'), '%0%0d %0%0M %0%0Y
%0%0H:%0%0i:%0%0s')) AND (SELECT
STR_TO_DATE((SELECT value FROM tbl_check WHERE username =
'%{User-Name}' AND attribute = 'Expiration'),
'%0%0d %0%0M %0%0Y %0%0H:%0%0i:%0%0s')) -> SELECT
SUM(acctsessiontime) FROM tbl_acct where username
= 'suman' AND acctstarttime BETWEEN (SELECT
STR_TO_DATE((SELECT value FROM tbl_check WHERE
username = 'suman' AND attribute = 'Activation'), '%0%0d %0%0M
%0%0Y %0%0H:%0%0i:%0%0s')) AND (SELECT
STR_TO_DATE((SELECT value FROM tbl_check WHERE username =
'suman' AND attribute = 'Expiration'), '%0%0d
%0%0M %0%0Y %0%0H:%0%0i:%0%0s'))<br>
sqlcounter_expand: '%{sql:SELECT SUM(acctsessiontime) FROM
tbl_acct where username = 'suman' AND
acctstarttime BETWEEN (SELECT STR_TO_DATE((SELECT
value FROM tbl_check WHERE username = 'suman' AND
attribute = 'Activation'), '%0%0d %0%0M %0%0Y
%0%0H:%0%0i:%0%0s')) AND (SELECT
STR_TO_DATE((SELECT value FROM tbl_check WHERE username =
'suman' AND attribute = 'Expiration'), '%0%0d
%0%0M %0%0Y %0%0H:%0%0i:%0%0s'))}'<br>
[monthlycounter] sql_xlat<br>
[monthlycounter] expand: %{User-Name} -> suman<br>
[monthlycounter] sql_set_user escaped user --> 'suman'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] WARNING: Unknown variable '%0': See
'doc/variables.txt'<br>
[monthlycounter] expand: SELECT SUM(acctsessiontime) FROM
tbl_acct where username = 'suman' AND
acctstarttime BETWEEN (SELECT STR_TO_DATE((SELECT
value FROM tbl_check WHERE username = 'suman' AND
attribute = 'Activation'), '%0%0d %0%0M %0%0Y
%0%0H:%0%0i:%0%0s')) AND (SELECT
STR_TO_DATE((SELECT value FROM tbl_check WHERE username =
'suman' AND attribute = 'Expiration'), '%0%0d
%0%0M %0%0Y %0%0H:%0%0i:%0%0s')) -> SELECT SUM(acctsessiontime)
FROM tbl_acct where username = 'suman' AND
acctstarttime BETWEEN (SELECT STR_TO_DATE((SELECT
value FROM tbl_check WHERE username = 'suman' AND
attribute = 'Activation'), '%0%0d %0%0M %0%0Y
%0%0H:%0%0i:%0%0s')) AND (SELECT
STR_TO_DATE((SELECT value FROM tbl_check WHERE username =
'suman' AND attribute = 'Expiration'), '%0%0d
%0%0M %0%0Y %0%0H:%0%0i:%0%0s'))<br>
rlm_sql (sql): Reserving sql socket id: 2<br>
[monthlycounter] row[0] returned NULL<br>
rlm_sql (sql): Released sql socket id: 2<br>
[monthlycounter] expand: %{sql:SELECT SUM(acctsessiontime)
FROM tbl_acct where username = 'suman' AND
acctstarttime BETWEEN (SELECT STR_TO_DATE((SELECT
value FROM tbl_check WHERE username = 'suman' AND
attribute = 'Activation'), '%0%0d %0%0M %0%0Y
%0%0H:%0%0i:%0%0s')) AND (SELECT
STR_TO_DATE((SELECT value FROM tbl_check WHERE username =
'suman' AND attribute = 'Expiration'), '%0%0d
%0%0M %0%0Y %0%0H:%0%0i:%0%0s'))} -><br>
rlm_sqlcounter: No integer found in string ""<br>
++[monthlycounter] returns noop<br>
rlm_sqlcounter: Entering module authorize code<br>
rlm_sqlcounter: Could not find Check item value pair<br>
++[noresetcounter] returns noop<br>
rlm_checkval: Item Name: Calling-Station-Id, Value: 001122334455<br>
rlm_checkval: Value Name: Calling-Station-Id, Value: 001122334455<br>
++[checkval] returns ok<br>
[expiration] Checking Expiration time: '13 Mar 2012 21:37:23'<br>
++[expiration] returns ok<br>
++[logintime] returns noop<br>
++[pap] returns updated<br>
Found Auth-Type = PAP<br>
+- entering group PAP {...}<br>
[pap] login attempt with password "duman12"<br>
[pap] Using CRYPT encryption.<br>
[pap] User authenticated successfully<br>
++[pap] returns ok<br>
+- entering group post-auth {...}<br>
[sqlippool] No Pool-Name defined.<br>
[sqlippool] expand: No Pool-Name defined (did
%{Called-Station-Id} cli %{Calling-Station-Id} port %{NAS-Port}
user %{User-Name}) -> No Pool-Name defined (did cli
001122334455 port user suman)<br>
No Pool-Name defined (did cli 001122334455 port user suman)<br>
++[sqlippool] returns noop<br>
[sql] expand: %{User-Name} -> suman<br>
[sql] sql_set_user escaped user --> 'suman'<br>
[sql] expand: %{User-Password} -> duman12<br>
[sql] expand: INSERT INTO tbl_postauth
(username, pass, reply, authdate) VALUES
(
'%{User-Name}',
'%{%{User-Password}:-%{Chap-Password}}',
'%{reply:Packet-Type}', '%S') -> INSERT INTO
tbl_postauth (username, pass, reply,
authdate) VALUES
( 'suman',
'duman12', 'Access-Accept', '2011-03-15
15:57:53')<br>
rlm_sql (sql) in sql_postauth: query is INSERT INTO
tbl_postauth (username, pass, reply,
authdate) VALUES
( 'suman',
'duman12', 'Access-Accept', '2011-03-15
15:57:53')<br>
rlm_sql (sql): Reserving sql socket id: 1<br>
rlm_sql (sql): Released sql socket id: 1<br>
++[sql] returns ok<br>
++[exec] returns noop<br>
Sending Access-Accept of id 10 to 122.175.85.117 port 21658<br>
Session-Timeout = 31469970<br>
Finished request 0.<br>
Going to the next request<br>
Waking up in 4.9 seconds.<br>
Cleaning up request 0 ID 10 with timestamp +3<br>
Ready to process requests.<br>
<br>
************************************************************************************<br>
<br>
The above is the complete log , nothing removed . As you can see
%0%0d %0%0M %0%0Y %0%0H:%0%0i:%0%0s which is nothing but %%%%d
%%%M %%%%Y %%%%H ............<br>
I am using freeradius 2.1.8 and now i am in a process of checking
the same in the latest release.<br>
<br>
As for the read receipt is concerned then i am sorry in case i
have annoyed you in any way.<br>
<br>
Best Regards<br>
Suman Dash<br>
<br>
<br>
<br>
<br>
On 3/15/2011 3:29 PM, Alan DeKok wrote:
<blockquote cite="mid:4D7F3883.80101@deployingradius.com"
type="cite">
<pre wrap="">Suman Dash wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> sqlcounter monthlycounter {
</pre>
</blockquote>
<pre wrap="">...
</pre>
<blockquote type="cite">
<pre wrap=""> WHERE username = '%{%k}' AND attribute = 'Activation'),
'%%%%d %%%%M %%%%Y %%%%H:%%%%i:%%%%s')) \
</pre>
</blockquote>
<pre wrap=""> The debug log doesn't show that this string is being used.
And *again* you delete large amounts of the debug log. Why? It just
makes it harder to help you.
In short: you are editing a configuration file, BUT the server isn't
using the configuration file you're editing. That is likely the *major*
source of the problems you're seeing.
And don't CC me on messages to the list. I *do* read the list. And
especially do NOT set "return receipt requested". It's rude and
annoying. If it keeps up, I'll just delete the messages unread.
Alan DeKok.
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5924 (20110303) __________
The message was checked by ESET NOD32 Antivirus.
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.eset.com">http://www.eset.com</a>
</pre>
</blockquote>
<br>
<br>
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5924 (20110303) __________<br>
<br>
The message was checked by ESET NOD32 Antivirus.<br>
<br>
<a moz-do-not-send="true" href="http://www.eset.com">http://www.eset.com</a><br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
-
List info/subscribe/unsubscribe? See <a class="moz-txt-link-freetext" href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a>
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5924 (20110303) __________
The message was checked by ESET NOD32 Antivirus.
<a class="moz-txt-link-freetext" href="http://www.eset.com">http://www.eset.com</a>
</pre>
</blockquote>
</body>
</html>