Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 ran into a problem when Apache uses auth for the entire web site; which authenticates over LDAP.

However, I need to be able to run a certain process which creates an HTTP request to a web service URL from Unix command line, and is executed as a system user which is NOT in LDAP.

Is it possible to somehow configure Apache to pretend that a specific URL was authenticated when it wasn't? (I don't mean turn OFF authentication - I still need to have REMOTE_USER set to correct user).


share|improve this question

What program are you using to generate the http request? You should have that program authenticate to Apache. curl, for example, supports HTTP Basic, HTTP digest, NTLM, and GSS-Negotiate.; e.g.

curl --basic --user username:password
share|improve this answer
Apache is doing LDAP auth against LDAP database. And the user is NOT in LDAP> – Aye Mar 26 '11 at 20:32
What do you mean by "the user"? The user that the process making the web service request runs as on Unix? That doesn't matter, as Apache never sees that. Just have your process send Apache a username and password that is valid for a user in LDAP. Or are you saying that the web service makes use of the CGI environment variable REMOTE_USER, which is set by the Apache authentication, but you want to be able to have Apache set REMOTE_USER to an arbitrary value without actually performing any authentication? – sciurus Mar 27 '11 at 14:58

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.