Basic Authentication – Maybe Off Topoc

Home » CentOS » Basic Authentication – Maybe Off Topoc
CentOS 3 Comments

Hi – I am using CentOS 7.3 and trying to receive basic authentication.

I run a command liked: curl -X POST -u jerry:pw

When I use printenv in the cgi I do not see the user and password anywhere. Isn’t it supposed to be there in an environment variable like REMOTE_USER ?

How do I receive the basic authentication ?



3 thoughts on - Basic Authentication – Maybe Off Topoc

  • Is this a ‘curl’ question, a ‘How do you write CGI?’ question or a general question about how HTTP works?

  • Hi Jonathan,

    This was just a general question on why I’m not seeing what I expected. I’m using CentOS 7.3, I have written CGI for years (not using user & pass), I’ve used http for years – I was just hoping someone might be able to shed some light on why I’m not seeing the REMOTE_USER. I did several searches and did not find any resolution.

    Thanks for any pointers.


  • I can’t tell from your description if this might be the issue, but you will only see the REMOTE_USER value if the resource being requested requires basic authentication. You don’t see it, even if passed, on pages where authentication isn’t required.