Check on ADSL-Agent-Remote-Id instead of username

Alan DeKok aland at
Thu Apr 19 17:29:48 CEST 2018

On Apr 19, 2018, at 3:28 AM, Marijn van Gool <marijn.vangool at> wrote:
> I was wondering if there is a better suggestion to what I’m doing here.
> I could very well do the following by setting the username equal to the Agent Remote Id.

  Don't do that.  Just change the SQL queries to use the remote ID *or* User-Name.  See SQL-User-Name in the configuration.

> I would be then only using the radcheck table setting the Auth-Type to Accept and the radreply table for returning the IP address.


>> if ("%{sql:SELECT username FROM radcheck WHERE username = '%{string:ADSL-Agent-Remote-Id}'}" != "") {
>>   update request {
>>      User-Name := "%{string:&ADSL-Agent-Remote-Id}"
>>   }
>> }
> When I do this:
>> update control {
>> 	Auth-Type := Accept
>> }
> the check on radreply table gets skipped and nothing is returned int the Access-Accept packet.
> Any idea why?

  Probably because you configured it to not run the SQL module if that happens.

  As always, read the debug output to see what it's doing.  We can't make detailed solutions if we're given vague descriptions of the problem.

  Alan DeKok.

More information about the Freeradius-Users mailing list