Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

NTLM -> REMOTE_USER

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
garfield
Posts: 13
Joined: 2013-03-15 21:29

NTLM -> REMOTE_USER

#1 Post by garfield »

I've installed a Debian 8.2 amd64 with apache, mysql and php. I want to retrieve the REMOTE_USER-name from a php page using NTLM but I can't get it working.
Tried using Perl, Kerberos and the old mod_ntlm but without any result.

My enabled modules in apache:
alias
auth_basic
auth_kerb
authn_core
authn_file
authz_core
authz_host
authz_user
autoindex
cgi
deflate
dir
env
filter
mime
mpm_prefork
negotiation
perl
php5
setenvif
status

I've created a httpd.conf file:

Code: Select all

DirectoryIndex index.php index.html index.htm KeepAlive on HostnameLookups on <Location /test>
  PerlAuthenHandler "Apache2::AuthenNTLM"
  AuthType ntlm,basic
  AuthName "NTLM Authentication"
  require valid-user
  PerlAddVar ntdomain "MYDOMAIN 10.52.43.220"
  PerlSetVar defaultdomain "MYDOMAIN"
  PerlSetVar splitdomainprefix 1
  PerlSetVar ntlmdebug 0
  PerlSetVar ntlmauthorative off
  PerlSetVar ntlmsemkey 0
  PerlSetVar ntlmsemtimeout 1
</Location>
apache2.conf is the default file without any changes.

Because it doesn't work I tried putting an .htaccess in /var/www/test

Code: Select all

<Location /test>
AuthType NTLM
NTLMAuth on
NTLMAuthoritative on
NTLMDomain MYDOMAIN
NTLMServer 10.52.43.220
require valid-user
</Location>
But it doesn't work either.

/var/log/apache2/error.log displays this:

Code: Select all

[Thu Oct 08 11:34:23.786879 2015] [mpm_prefork:notice] [pid 2287]
AH00163: Apache/2.4.10 (Debian) mod_auth_kerb/5.4 mod_perl/2.0.9dev
Perl/v5.20.2 configured -- resuming normal operations [Thu Oct 08 11:34:23.786922 2015] [core:notice] [pid 2287] AH00094: 
Command line: '/usr/sbin/apache2'
[Thu Oct 08 11:35:39.656529 2015] [:error] [pid 2293] [client 10.52.43.14:49784] PHP Notice:  Undefined index: REMOTE_USER in /var/www/html/test/ntlm.php on line 2, referer: http://10.52.43.71/test/
What am I doing wrong and how can I fix it?
I have a previous version of Debian running on a standalone server with the NTLM working but I want to virtualize the OS.

Post Reply