I can\'t seem to wrap my head around this. I\'m trying to script automating an upload of a csv but the curl is failing with a 401.
curl -v --ntlm -u username --u
You try this
If you have a page hosted in IIS and that work with NTLM then you should put:
(for example at Sharepoint page)
curl http://enterprisesharepoint -v --ntlm --negotiate -u USER123:PASSWORD123
It's work fine for me and you can see the headers message
--Edit--
if you put negotiate, this give the local account and log in with the server, if a user name and password are incorrect, that's no matter because negotiate do automatic autentication with windows account for the user local loged. If you don't like this behavior, you should be put only ntlm for correct ntlm login.
The following works
curl -X POST -k -v --ntlm --negotiate -u usernamehere -F "csv=@pt_update.csv" -F "op=add" "https://google.com/csv_import"