Hi all,
I am trying to get the perl module Apache2::AuthenNTLM in apache. This is authenticate against Windows Active directory. I have looked through various walkthoughs online, however I am facing an error in the log indicating Apache2::AuthenNTLM cannot be found.
Code:
[Wed Mar 20 19:44:35 2013] [error] [client 127.0.0.1] failed to resolve handler `Apache::AuthenNTLM': Can't locate Apache/AuthenNTLM.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at (eval 2) line 3.\n
Upon further investigation @INC referrs to the perl path and can be views using perl -V. Here are the results and the end of the file:
Code:
Compiled at May 3 2011 11:19:27
@INC:
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl
/usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl
/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/5.8.8
I am able to find AuthenNTLM.pm in the following directory which is listed in the @INC path.
Code:
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Apache2
ls- l
-r--r--r-- 1 root root 31254 Apr 28 2005 AuthenNTLM.pm
These are the settings I have added to either a file in /etc/httpd/conf.d or to .htaccess
Code:
<Directory "/">
PerlAuthenHandler Apache2::AuthenNTLM
AuthType ntlm,basic
require valid-user
PerlAddVar ntdomain "nt_domainname pdc bdc"
PerlSetVar defaultdomain nt_domainname
PerlSetVar splitdomainprefix 1
PerlSetVar ntlmdebug 0
PerlsetVar ntlmauthoritative off
</Directory>
Can anyone who has setup apache to authenticate with Active Directory tell me where I'm going wrong with this and possibly suggest other solutions?
Thanks