How to escape values in radclient?

rany rany2 at riseup.net
Sun May 7 18:52:30 UTC 2023


This is what the server received with -X set for the hex variant:

(2) Received Access-Request Id 31 from 127.0.0.1:50245 to 127.0.0.1:1812 
length 98
(2)   Framed-Protocol = PPP
(2)   Message-Authenticator = 0x3e181e9c7e2f53a2c3433b640a968db7
(2)   NAS-IP-Address = 10.146.80.1
(2)   NAS-Port = 0
(2)   Service-Type = Framed-User
(2)   User-Name = "\\x72\\x61\\x6e\\x79"
(2)   User-Password = "mypasssword"

On 5/7/23 21:48, rany wrote:
> On 5/7/23 21:47, Alan DeKok wrote:
>
>> On May 7, 2023, at 8:45 PM, rany <rany2 at riseup.net> wrote:
>>> I tried with this file named "test.txt":
>>>
>>> Framed-Protocol = PPP
>>> Message-Authenticator = 0x00
>>> NAS-IP-Address = redacted
>>> NAS-Port = 0
>>> Service-Type = Framed-User
>>> User-Name = "\x72\x61\x6e\x79"
>>> #User-Name = "rany"
>>> User-Password = "mypassword"
>>>
>>> Hex escaped variant does not work, I ran it like so: `radclient -f 
>>> test.txt 127.0.0.1 auth testing123`
>>    Define "does not work".
>>
>>    i.e. you have logs of what the server receives.  Post them. Don't 
>> give vague english descriptions.
>>
>>    Alan DeKok.
>>
>> -
>> List info/subscribe/unsubscribe? See 
>> http://www.freeradius.org/list/users.html
>
> "does not work" = I get an "Access-Reject" as a response from the server.
>
> Hex escaped variant:
>
> # radclient -f test 127.0.0.1 auth testing123
> Sent Access-Request Id 100 from 0.0.0.0:35361 to 127.0.0.1:1812 length 98
> Received Access-Reject Id 100 from 127.0.0.1:1812 to 127.0.0.1:35361 
> length 20
> (0) test: Expected Access-Accept got Access-Reject
>
> Non-hex escaped:
>
> # radclient -f test 127.0.0.1 auth testing123
> Sent Access-Request Id 148 from 0.0.0.0:42483 to 127.0.0.1:1812 length 86
> Received Access-Accept Id 148 from 127.0.0.1:1812 to 127.0.0.1:42483 
> length 20
>
> -
> List info/subscribe/unsubscribe? See 
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list