Variable/Attribute expansion in SQL

modesto at hubsoft.com.br modesto at hubsoft.com.br
Tue Mar 8 12:48:43 UTC 2022



On 07/03/2022 18:13, Alan DeKok <aland at deployingradius.com> wrote:
> On Mar 7, 2022, at 4:07 PM, Antônio Modesto <modesto at hubsoft.com.br> wrote:
> >
> > Do you guys know if there is a way to have variable expansion working when attributes are fetched from a SQL database? For example:
> >
> > Reply-Message := "Hello, %{User-Name}"
> >
> > I have a situation where I must use something like this only for a specific type of NAS. I could edit the configuration to do this conditionally in the post-auth section, but if it is possible with SQL it would be a cleaner solution.
> 
>    Yes.  Just put the strings into SQL, and they will be expanded.

That's odd, I tried that but the literal expression is returned in the Access-Accept:

          Vendor-Specific Attribute (26), length: 20, Value: Vendor: Unknown (6527)
            Vendor Attribute: 11, Length: 12, Value: %{User-Name}




> 
>    Alan DeKok.
> 
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
> 


More information about the Freeradius-Users mailing list