Attributes Bandwidth in radgrouprepy table
"Belén Colmenar (Grupo GOWEX)"
bcolmenar at gowex.com
Tue Dec 16 11:17:22 CET 2008
Good morning,
I add that part where sql module is instatied
Module: Linked to module rlm_sql
Module: Instantiating sql
sql {
driver = "rlm_sql_mysql"
server = "x.x.x.x"
port = ""
login = "xxxx"
password = "xxxx"
radius_db = "xxxx"
read_groups = yes
sqltrace = no
sqltracefile = "/usr/local/freeradius/var/log/radius/sqltrace.sql"
readclients = no
deletestalesessions = yes
num_sql_socks = 5
sql_user_name = "%{User-Name}"
default_user_profile = ""
nas_query = "SELECT id,nasname,shortname,type,secret FROM nas"
authorize_check_query = "SELECT id, username, attribute, value,
op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id"
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"
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"
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'"
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}'"
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}')"
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')"
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}'"
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}'"
accounting_stop_query_alt = ""
connect_failure_retry_delay = 60
simul_count_query = ""
simul_verify_query = "SELECT radacctid, acctsessionid,
username, nasipaddress, nasportid, framedipaddress, callingstationid,
framedprotocol FROM radacct WHERE username = '%{SQL-User-Name}' AND
acctstoptime IS NULL"
postauth_query = "INSERT INTO radpostauth (username, pass,
reply, authdate) VALUES ('%{User-Name}',
'%{%{User-Password}:-%{Chap-Password}}', '%{reply:Packet-Type}', '%S')"
safe-characters =
"@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_: /"
}
rlm_sql (sql): Driver rlm_sql_mysql (module rlm_sql_mysql) loaded and linked
On the other hand, I don't know how I can fix this fail and why is produced
WARNING: Found User-Password == "...".
WARNING: Are you sure you don't mean Cleartext-Password?
WARNING: See "man rlm_pap" for more information.
Thanks
tnt at kalik.net escribió:
>> [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 =
>> 'pepe at dominio.com' 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.
>>
>
> Fix that.
>
>
>> [sql] User found in radcheck table
>> rlm_sql (sql): Released sql socket id: 4
>> ++[sql] returns ok
>>
>>
>
> 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
>
>
>> 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 http://www.freeradius.org/list/users.html
>>
>>
>>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20081216/eeeaef65/attachment.html>
More information about the Freeradius-Users
mailing list