Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I trying to access the following site with cURL. (https://www.fleetagent.be) I have cURL configured with the following switches -L -k --proxy [username:password] I get the following error. What switches do need to add to get cURL to get the website?

The url https://www.fleetagent.be is redirected to https://www.fleetagent.be/portal/pls/portal. Somehow the website is authenticating it self for the redirected portal. how can i simulate this behavior with cURL?

<TITLE>401 Unauthorized</TITLE>
This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.<P>
<P>Additionally, a 404 Not Found
error was encountered while trying to use an ErrorDocument to handle the request.

Thanks. Darrell.

share|improve this question

I asume you have an account for this portal. Add it to your curl call:

--user <user[:password]> Set server user and password

curl -L -k --proxy [username:password] --user <user[:password]> https://www.fleetagent.be/portal/pls/portal

You are only submitting username and password for the proxy, but not for the actual website.

share|improve this answer
This is the command i'm using now. I'm aware that the username/password is not for the website but for the proxy. De problem is I still get the error. My current configfile contains this: # volg http redirects -L # negeer certificaaten -k # proxy instellingen --proxy prxn001:8080 --proxy-ntlm --proxy-user txxxxxxb:cxxxxxxxx – DeChinees Jan 7 '11 at 10:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.