cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl ntlm failing with domain part

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 13 Sep 2010 11:00:12 -0700

On Mon, Sep 13, 2010 at 07:13:08AM -0700, Fábio Gomes wrote:
>   I'm trying to use curl with --ntlm option. It authenticates correctly if I
> only supply the username and password without the domain part:
>
> curl -u USER:PASS --ntlm  URI
>
>   But when I supply the domain part of the user/pass pair it fails:
>
> curl -u DOMAIN\USER:PASS --ntlm  URI
>
>   It works correctly with Firefox.
>
>   Is there anything missing? Does anyone have any tip? I've tried using quotes
> and it didn't help either.

You didn't say what OS you're running this on, but on Bourne-like shells, the
backslash is interpreted then removed by the shell. Quotes around the
"DOMAIN\USER:PASS" will cause the backslash to be sent as-is. I just tried that
on a Linux box without a problem.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-13