Apache2 :: AuthenNTLM连接到域控制器,但不进行身份validation

我有一个运行Apache2 :: AuthenNTLM的Apache 2.2服务器。 我已经成功地将Apache2 :: AuthenNTLMconfiguration到它连接到域控制器的地步。 但是,有效的用户名/密码组合会在日志中显示“错误的用户/密码”,并且不会进行身份validation。

这是Apache的configuration:

PerlAuthenHandler Apache2::AuthenNTLM AuthType ntlm AuthName "NTLM TEST" Require valid-user # DOMAIN has is the domain users authenticate to, DOMAIN\username # subdomain points to the domain controller. subdomain.domain.local. # /etc/hosts maps subdomain to the correct IP. PerlAddVar ntdomain "DOMAIN subdomain" PerlSetVar ntlmdebug 1 PerlSetVar defaultdomain DOMAIN PerlSetVar splitdomainprefix 1 

这是apache日志的输出:

 [4460] AuthenNTLM: Start NTLM Authen handler pid = 4460, connection = -1147051008 conn_http_hdr = Keep-Alive main = cuser = remote_ip = 10.119.1.141 remote_port = 13873 remote_host = <> version = 0.02 smbhandle = [4460] AuthenNTLM: Object exists user = \ [4460] AuthenNTLM: Authorization Header NTLM [4460] AuthenNTLM: protocol=NTLMSSP, type=1, flags1=7(NEGOTIATE_UNICODE,NEGOTIATE_OEM,REQUEST_TARGET), flags2=130(NEGOTIATE_ALWAYS_SIGN,NEGOTIATE_NTLM), domain length=0, domain offset=0, host length=0, host offset=0, host=, domain= [4460] handler type == 1 [4460] AuthenNTLM: Connect to pdc = subdomain bdc = domain = DOMAIN [4460] AuthenNTLM: timed outwhile waiting for lock (key = 23754) [4460] AuthenNTLM: leave lock [4460] AuthenNTLM: verify handle smbhandle == -1146832856 [4460] AuthenNTLM: charencoding = 1 [4460] AuthenNTLM: flags2 = 130 [4460] AuthenNTLM: Send header: NTLM ... [4460] AuthenNTLM: verify handle = 1 smbhandle == -1146832856 [4460] AuthenNTLM: Start NTLM Authen handler pid = 4460, connection = -1147051008 conn_http_hdr = Keep-Alive main = cuser = remote_ip = 10.119.1.141 remote_port = 13873 remote_host = <> version = 0.02 smbhandle = [4460] AuthenNTLM: Object exists user = \ [4460] AuthenNTLM: Authorization Header NTLM [4460] AuthenNTLM: protocol=NTLMSSP, type=3, user=username, host=host, domain=DOMAIN, msg_len=0 [4460] handler type == 3 [4460] AuthenNTLM: verify handle = 3 smbhandle == -1146832856 [4460] AuthenNTLM: Verify user user via smb server [4460] AuthenNTLM: rc = 3 ntlmhash = ***************** 

虚拟主机日志:

 [Mon Apr 18 15:36:38 2011] [error] Wrong password/user (rc=3/1/327681): DOMAIN\\username for /ntlm 

我不知道如何解决这个问题,我是一个Linux的家伙,Windowsnetworking是我的一门外语。 我确信域控制器是有我的AD条目,我知道用户名和密码应该工作。 谢谢。

你不会说你使用的是哪种客户端,但是一旦我经历了同样的行为,事实certificate它与Windows 7中新的默认NTLM客户端设置有关。

旧版本的Windows使用NTLMv1。 由于NTLMv1可以在几分钟内被破解,微软已经在Vista中切换到NTLMv2。 不幸的是,AuthenNTLM已经很老了,并且不能正确地将新的NTLM消息中继到主动域控制器。 有点令人惊讶的部分是,它实际上并不关心我用什么浏览器:所有(IExplorer,Firefox,Chrome)显然使用操作系统设施来处理NTLM消息…

我的解决scheme是从头开始编写 PyAuthenNTLM2 (Apache的另一个模块),因为服务器不是域的一部分,AuthenNTLM是唯一的select( modntlm将不会编译)。 PyAuthenNTLM2处理NTLMv1和NTLMv2,但基于mod-python,而不是Perl。

networking上的几个网站build议在客户端操作系统中调整一个(相当好隐藏的)安全设置,以便使用旧的NTLMv1,但是我会避开这个。 根据今天的标准,NTLMv1完全不安全。