<!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 bgcolor="#ffffff" text="#000000">
Good morning,<br>
<br>
I add that part where sql module is instatied<br>
<font color="#3333ff" size="-1">Module: Linked to module rlm_sql<br>
Module: Instantiating sql<br>
sql {<br>
driver = "rlm_sql_mysql"<br>
server = "x.x.x.x"<br>
port = ""<br>
login = "xxxx"<br>
password = "xxxx"<br>
radius_db = "xxxx"<br>
read_groups = yes<br>
sqltrace = no<br>
sqltracefile =
"/usr/local/freeradius/var/log/radius/sqltrace.sql"<br>
readclients = no<br>
deletestalesessions = yes<br>
num_sql_socks = 5<br>
sql_user_name = "%{User-Name}"<br>
default_user_profile = ""<br>
nas_query = "SELECT id,nasname,shortname,type,secret FROM nas"<br>
authorize_check_query = "SELECT id, username, attribute, value,
op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id"<br>
authorize_group_check_query = "SELECT
radgroupcheck.id,radgroupcheck.GroupName,radgroupcheck.Attribute,radgroupcheck.Value,radgroupcheck.op
FROM radgroupcheck,usergroup WHERE usergroup.Username =
'%{SQL-User-Name}' AND usergroup.GroupName = radgroupcheck.GroupName
ORDER BY radgroupcheck.id"<br>
authorize_group_reply_query = "SELECT radgroupreply.id,
radgroupreply.GroupName,radgroupreply.Attribute,
radgroupreply.Value,radgroupreply.op FROM radgroupreply,usergroup WHERE
usergroup.Username = '%{SQL-User-Name}' AND usergroup.GroupName =
radgroupreply.GroupName ORDER BY radgroupreply.id"<br>
accounting_onoff_query = "UPDATE radacct SET acctstoptime=
'%S', acctsessiontime = unix_timestamp('%S') -
unix_timestamp(acctstarttime), acctterminatecause =
'%{Acct-Terminate-Cause}', acctstopdelay = %{%{Acct-Delay-Time}:-0}
WHERE acctstoptime IS NULL AND nasipaddress = '%{NAS-IP-Address}' AND
acctstarttime<= '%S'"<br>
accounting_update_query = "UPDATE radacct SET framedipaddress =
'%{Framed-IP-Address}', acctsessiontime = '%{Acct-Session-Time}',
acctinputoctets = '%{%{Acct-Input-Gigawords}:-0}' << 32 |
'%{%{Acct-Input-Octets}:-0}', acctoutputoctets =
'%{%{Acct-Output-Gigawords}:-0}' << 32 |
'%{%{Acct-Output-Octets}:-0}' WHERE acctsessionid =
'%{Acct-Session-Id}' AND username= '%{SQL-User-Name}' AND
nasipaddress = '%{NAS-IP-Address}'"<br>
accounting_update_query_alt = "INSERT INTO radacct
(acctsessionid, acctuniqueid, username, realm, nasipaddress,
nasportid, nasporttype, acctstarttime, acctsessiontime,
acctauthentic, connectinfo_start, acctinputoctets, acctoutputoctets,
calledstationid, callingstationid, servicetype, framedprotocol,
framedipaddress, acctstartdelay, xascendsessionsvrkey)
VALUES ('%{Acct-Session-Id}',
'%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}',
'%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}',
DATE_SUB('%S', INTERVAL
(%{%{Acct-Session-Time}:-0} + %{%{Acct-Delay-Time}:-0}) SECOND),
'%{Acct-Session-Time}', '%{Acct-Authentic}', '',
'%{%{Acct-Input-Gigawords}:-0}' << 32 |
'%{%{Acct-Input-Octets}:-0}', '%{%{Acct-Output-Gigawords}:-0}'
<< 32 | '%{%{Acct-Output-Octets}:-0}', '%{Called-Station-Id}',
'%{Calling-Station-Id}', '%{Service-Type}', '%{Framed-Protocol}',
'%{Framed-IP-Address}', '0', '%{X-Ascend-Session-Svr-Key}')"<br>
accounting_start_query = "INSERT INTO radacct (acctsessionid,
acctuniqueid, username, realm, nasipaddress, nasportid, nasporttype,
acctstarttime, acctstoptime, acctsessiontime, acctauthentic,
connectinfo_start, connectinfo_stop, acctinputoctets,
acctoutputoctets, calledstationid, callingstationid,
acctterminatecause, servicetype, framedprotocol, framedipaddress,
acctstartdelay, acctstopdelay) VALUES ('%{Acct-Session-Id}',
'%{Acct-Unique-Session-Id}', '%{SQL-User-Name}', '%{Realm}',
'%{NAS-IP-Address}', '%{NAS-Port}', '%{NAS-Port-Type}', '%S', NULL,
'0', '%{Acct-Authentic}', '%{Connect-Info}', '', '0', '0',
'%{Called-Station-Id}', '%{Calling-Station-Id}', '',
'%{Service-Type}', '%{Framed-Protocol}',
'%{Framed-IP-Address}', '%{%{Acct-Delay-Time}:-0}', '0')"<br>
accounting_start_query_alt = "UPDATE radacct SET acctstarttime
= '%S', acctstartdelay = '%{%{Acct-Delay-Time}:-0}', connectinfo_start
= '%{Connect-Info}' WHERE acctsessionid = '%{Acct-Session-Id}' AND
username = '%{SQL-User-Name}' AND nasipaddress = '%{NAS-IP-Address}'"<br>
accounting_stop_query = "UPDATE radacct SET acctstoptime = '%S',
acctsessiontime = '%{Acct-Session-Time}', acctinputoctets =
'%{%{Acct-Input-Octets}:-0}', acctoutputoctets =
'%{%{Acct-Output-Octets}:-0}', acctterminatecause =
'%{Acct-Terminate-Cause}', acctstopdelay = '%{%{Acct-Delay-Time}:-0}',
connectinfo_stop = '%{Connect-Info}' WHERE acctsessionid =
'%{Acct-Session-Id}' AND username = '%{SQL-User-Name}' AND
nasipaddress = '%{NAS-IP-Address}'"<br>
accounting_stop_query_alt = ""<br>
connect_failure_retry_delay = 60<br>
simul_count_query = ""<br>
simul_verify_query = "SELECT radacctid, acctsessionid,
username, nasipaddress, nasportid, framedipaddress, callingstationid,
framedprotocol FROM radacct WHERE username = '%{SQL-User-Name}' AND
acctstoptime IS NULL"<br>
postauth_query = "INSERT INTO radpostauth (username, pass,
reply, authdate) VALUES ('%{User-Name}',
'%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S')"<br>
safe-characters =
"@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"<br>
}<br>
rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and
linked</font><br>
<br>
On the other hand, I don't know how I can fix this fail and why is
produced<br>
<br>
<pre wrap="">WARNING: Found User-Password == "...".
WARNING: Are you sure you don't mean Cleartext-Password?
WARNING: See "man rlm_pap" for more information.
Thanks
</pre>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:tnt@kalik.net">tnt@kalik.net</a> escribió:
<blockquote cite="mid:Y0HT6pSa.1229366208.9737470.tnt@kalik.net"
type="cite">
<blockquote type="cite">
<pre wrap="">[sql] expand: SELECT id, username, attribute, value, op FROM radcheck
WHERE username = '%{SQL-User-Name}' ORDER BY id -> SELECT id, username,
attribute, value, op FROM radcheck WHERE username =
'<a class="moz-txt-link-abbreviated" href="mailto:pepe@dominio.com">pepe@dominio.com</a>' ORDER BY id
WARNING: Found User-Password == "...".
WARNING: Are you sure you don't mean Cleartext-Password?
WARNING: See "man rlm_pap" for more information.
</pre>
</blockquote>
<pre wrap=""><!---->
Fix that.
</pre>
<blockquote type="cite">
<pre wrap="">[sql] User found in radcheck table
rlm_sql (sql): Released sql socket id: 4
++[sql] returns ok
</pre>
</blockquote>
<pre wrap=""><!---->
And what happened to authorize_reply_query? It would be helpful to see
part of the server startup debug where sql module is instatiated.
Ivan Kalik
Kalik Informatika ISP
</pre>
<blockquote type="cite">
<pre wrap="">It's checking the query in radcheck but not in radgroupreply. And I've
tested the query in dialup.conf and seems correct
authorize_group_reply_query = "SELECT ${groupreply_table}.id,
${groupreply_table}.GroupName,${groupreply_table}.Attribute,
${groupreply_table}.Value,${groupreply_table}.op FROM
${groupreply_table},${usergroup_table} WHERE ${usergroup_table}.Username
= '%{SQL-User-Name}' AND ${usergroup_table}.GroupName =
${groupreply_table}.GroupName ORDER BY ${groupreply_table}.id"
Thanks in advance
-
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>
</pre>
</blockquote>
<pre wrap=""><!---->
-
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>
</pre>
</blockquote>
<br>
</body>
</html>