I have PHP 5.6.17 and Apache 2.4.10 running on Debian 8.
I want to populate the PHP variable $_SERVER['REMOTE_USER']
with the Windows username, to log in the user if the username is in my database. I'm comfortable with the security risks involved in this method, as this will only be exposed on a local network.
Here is what I did in my Apache vhost definition:
<LocationMatch "/login/ssologin">
PerlAuthenHandler Apache2::AuthenNTLM
AuthBasicAuthoritative on
AuthType ntlm
AuthName "hello"
Require valid-user
PerlAddVar ntdomain "my.local"
PerlSetVar defaultdomain my.local
PerlSetVar splitdomainprefix 1
PerlSetVar ntlmauthoritative off
PerlSetVar ntlmdebug 1
</LocationMatch>
I put the URL into the trusted sites on Internet Explorer, but I was still prompted for basic authentication.
What did I miss?
My only goal is to get the username of the windows session. Is there another, easier way?