SQL SELECT statement

Charly netflow at geosciences.ensmp.fr
Tue May 19 09:38:03 CEST 2020

- i have local users stored in SQL database
- i have LDAP users
- in SQL database, i store Cisco-AVPair values for both of them

The SQL module doesn't process the radreply when user is not found in 
the radcheck table (=> LDAP users)

Le 18/05/2020 à 18:04, Alan DeKok a écrit :
>> On May 18, 2020, at 11:50 AM, Charly <netflow at geosciences.ensmp.fr> wrote:
>> For user authentication, i use SQL and LDAP modules but Cisco-AVPair values are only stored in SQL.  My config is :
>>          sql
>    Which runs the normal sql queries.
>>          update control {
>>                  SQL-Test = "%{%{sql:SELECT id FROM radcheck WHERE username = '%{User-Name}'}:-notfound}"
>>          }
>    Why?  The SQL module automatically processes the radcheck table.
>>          if (&control:SQL-Test == "notfound") {
>>                  update reply {
>>                          Cisco-AVPair += "%{sql:SELECT value FROM radreply WHERE username = '%{User-Name}' AND attribute = 'Cisco-AVPair' ORDER BY id}"
>>                  }
>    Again... why?  The SQL module automatically processes the radreply table.
>> Maybe it exists another way to do it ?
>    To do *what*?  The SQL module automatically processes the radcheck and radreply tables.
>    You're trying to do something special here, but I don't know what.  And you're not explaining anything.  Just "I configured a bunch of stuff, but it doesn't do what I want'.
>    Well, what do you want it to do?  Use words.  Explain.  I can't read your mind.  And because you're mis-using the configuration, I don't know what you expect it to do, either.
>    Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

More information about the Freeradius-Users mailing list