cURL / Mailing Lists / curl-library / Single Mail


Re: how to pass domain name for NTLM authentication?

From: Daniel Stenberg <>
Date: Fri, 11 Nov 2005 09:53:35 +0100 (CET)

On Fri, 11 Nov 2005, Satish Mittal wrote:

> For NTLM authentication, we need to pass domain, username and password. The
> libcurl option CURLOPT_USERPWD expects a string [username]:[password]. Where
> do i pass the domain name string then?
> I have set CURLOPT_HTTPAUTH option to value CURLAUTH_NTLM.

Right, the info was missing in the documentation. I've now added this chunk in
the docs for CURLOPT_USERPWD:

       When using NTLM, you can set domain by prepending it to the user
       name and separating the domain and name with a forward (/) or
       backward slash (\). Like this: "domain/user:password" or
       "domain\user:password". Some HTTP servers (on Windows) support
       this style even for Basic authentication.

  Commercial curl and libcurl Technical Support:
Received on 2005-11-11