Closed armitasp closed 7 years ago
Hmmm. Quoted and back tick quoted are dynamically expanded. What about ' or &User-Password in that ntlm_auth clause?
alan
On 10 Jul 2017, at 22:03, Alan Buxey notifications@github.com wrote:
Hmmm. Quoted and back tick quoted are dynamically expanded. What about ‘ or
Single quotes seem fine:
(3) ntlm_auth: Executing: /bin/ntlm_auth --request-nt-key --username=%{%{Stripped-User-Name}:-%{%{User-Name}:-None}} --domain=LUNET --password=%{User-Password}: (3) ntlm_auth: EXPAND --username=%{%{Stripped-User-Name}:-%{%{User-Name}:-None}} (3) ntlm_auth: --> —username=test-user (3) ntlm_auth: EXPAND --password=%{User-Password} (3) ntlm_auth: --> --password=test’1234
&User-Password in that ntlm_auth clause?
&User-Password doesn’t seem to work
Auth-Type ntlm_auth { (0) ntlm_auth: Executing: /bin/ntlm_auth --request-nt-key --username=%{%{Stripped-User-Name}:-%{%{User-Name}:-None}} --domain=LUNET --password=&User-Password: (0) ntlm_auth: EXPAND --username=%{%{Stripped-User-Name}:-%{%{User-Name}:-None}} (0) ntlm_auth: --> —username=test-user (0) ntlm_auth: ERROR: Program returned code (1) and output 'NT_STATUS_WRONG_PASSWORD: Wrong Password (0xc000006a)' (0) [ntlm_auth] = reject (0) } # Auth-Type ntlm_auth = reject
Scott
err, no, I meant putting the %{User-Password} into single quotes...not whether single quotes werent affected ;-)
eg use --password='%{User-Password}' , or --password="%{User-Password}" ?
alan
On 10 July 2017 at 22:15, Scott Armitage notifications@github.com wrote:
On 10 Jul 2017, at 22:03, Alan Buxey notifications@github.com wrote:
Hmmm. Quoted and back tick quoted are dynamically expanded. What about ‘ or
Single quotes seem fine:
(3) ntlm_auth: Executing: /bin/ntlm_auth --request-nt-key --username=%{%{Stripped-User-Name}:-%{%{User-Name}:-None}} --domain=LUNET --password=%{User-Password}: (3) ntlm_auth: EXPAND --username=%{%{Stripped-User- Name}:-%{%{User-Name}:-None}} (3) ntlm_auth: --> —username=test-user (3) ntlm_auth: EXPAND --password=%{User-Password} (3) ntlm_auth: --> --password=test’1234
&User-Password in that ntlm_auth clause?
&User-Password doesn’t seem to work
Auth-Type ntlm_auth { (0) ntlm_auth: Executing: /bin/ntlm_auth --request-nt-key --username=%{%{Stripped-User-Name}:-%{%{User-Name}:-None}} --domain=LUNET --password=&User-Password: (0) ntlm_auth: EXPAND --username=%{%{Stripped-User- Name}:-%{%{User-Name}:-None}} (0) ntlm_auth: --> —username=test-user (0) ntlm_auth: ERROR: Program returned code (1) and output 'NT_STATUS_WRONG_PASSWORD: Wrong Password (0xc000006a)' (0) [ntlm_auth] = reject (0) } # Auth-Type ntlm_auth = reject
Scott
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/FreeRADIUS/freeradius-server/issues/2018#issuecomment-314247101, or mute the thread https://github.com/notifications/unsubscribe-auth/ACE-VYG6JUBZPQrK72it5CrnONswA472ks5sMpRxgaJpZM4OTYvX .
On 10 Jul 2017, at 22:33, Alan Buxey notifications@github.com wrote:
err, no, I meant putting the %{User-Password} into single quotes...not whether single quotes werent affected ;-)
eg use --password='%{User-Password}' , or --password="%{User-Password}” ?
Ah, OK.
Tried it didn’t make any difference.
The double quote gets escaped when printing. Especially when running another program / shell script.
I'm not sure there's a simple fix which works here. We could just stop escaping... but that would potentially allow for malicious people to mess with the scripts you execute.
The better alternative is to use winbind instead of ntlm_auth. That avoids the issue entirely.
On 11 Jul 2017, at 13:30, Alan DeKok notifications@github.com wrote:
The double quote gets escaped when printing. Especially when running another program / shell script.
I'm not sure there's a simple fix which works here. We could just stop escaping... but that would potentially allow for malicious people to mess with the scripts you execute.
The better alternative is to use winbind instead of ntlm_auth. That avoids the issue entirely.
Indeed. I’ll give it a try and see if that works.
Scott
Issue type
Defect/Feature description
double quotes in User-Passwords become escaped e.g. test"1234 becomes test\"1234
Found in version 3.0.14
How to reproduce issue
perform a pap authentication with a password containing "
Output of
[radiusd|freeradius] -X
showing issue occurring