How can I pass my Windows credentials in cURL?
I use (in a Windows domain environment):
curl --ntlm -u : ...
cUrl knows to supply my domain credentials and it works every time.
Use -u :
which provides an empty usercode and password, to get cURL to pick those up from the credential store.
I use this on Unix with GSSAPI and curl -u : --negotiate ...
To elaborate on @Phil P answer heres how I did it from my ubuntu box.
- Find out the IP address of your domain controller instructions on how to do that here
- Install kerberos
sudo apt-get install krb5-user
Enter the following in your
/etc/krb5.conf
[libdefaults] default_realm = YOURDOMAN # note that this must be in UPPER CASE krb4_config = /etc/krb.conf krb4_realms = /etc/krb.realms kdc_timesync = 1 ccache_type = 4 forwardable = true proxiable = true v4_instance_resolve = false v4_name_convert = { host = { rcmd = host ftp = ftp } plain = { something = something-else } } fcc-mit-ticketflags = true [realms] YOURDOMAN = { kdc = YOUR_DOAMIN_CONTROLLER_IP } [domain_realm] yourdomain = yourdomain yourdomain. = yourdomain