Invalid variable expansion, mysql pattern matching, like %

Ana Gallardo Gómez anaougu at gmail.com
Tue May 3 12:26:15 CEST 2016


Hello,

I'm using FreeRADIUS Version 3.0.8in a debian 8.

I want to exec a sql query to return a value in Reply-Message:

/etc/freeradius/users

user        Cleartext-Password := "pass"
              Reply-Message := "%{sql:SELECT username FROM radpostauth
WHERE client like 'PA%' ....}"

When I run freeradius server in debug mode, I get:

Tue May  3 11:58:52 2016 : Debug: (0) files: ::: Examining Reply-Message
Tue May  3 11:58:52 2016 : ERROR: (0) files: %{sql:SELECT username FROM
radpostauth WHERE client like 'PA%' ....
Tue May  3 11:58:52 2016 : ERROR: (0) files:
                                                                     ^
Invalid variable expansion


If I delete the % in users files:

/etc/freeradius/users

user        Cleartext-Password := "pass"
              Reply-Message := "%{sql:SELECT username FROM radpostauth
WHERE client like 'PA' ....}"

When I run freeradius server in debug mode, I get:

rlm_sql (sql): Reserved connection (4)
(0) files: Executing select query: SELECT username FROM radpostauth WHERE
client like 'PA' and ...
(0) files: SQL query returned no results
rlm_sql (sql): Released connection (4)
(0) files: EXPAND %{sqllocal:SELECT username FROM radpostauth WHERE client
like 'PA' and


I have this running in older versions of freeradius.Sorry for my english
and thank you very much in advance.



::::::::::::::::::::::::::::::::::::
:: Ana Gallardo Gómez ::
::::::::::::::::::::::::::::::::::::


More information about the Freeradius-Users mailing list