Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the NTLM CPAN distribution.

Report information
The Basics
Id: 71645
Status: open
Priority: 0/
Queue: NTLM

People
Owner: Nobody in particular
Requestors: tiedwu [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.09
Fixed in: 1.09



Subject: NTLM 'domain\user' failed before
Download (untitled) / with headers
text/plain 4.6k
I am using NTLM-1.09 to try accessing http server with NTLM authentication for days, but it doesn’t work so far. I am just writting the script follow the example on LWP::Authen::Ntlm: <code> use LWP::UserAgent; use HTTP::Request::Common; use LWP::Debug qw(+); my $url = ‘http://10.1.1.1’; my $ua = LWP::UserAgent->new(keep_alive => 1); $ua->credentials(’10.1.1.1:80’, ‘’, “domain\\user”, ‘passwd’); $request = GET $url; $response = $ua->request($request); If ($response->is_success) { print “It worked \n”; } else { print “It didn’t work!->”. $response->status_line. “\n”; } exit 0; </code> The output of the executing is following, it seems failed into ‘domain\user’ but I am very sure they are definitely correct. For understand what’s the header received from serve and what’s the header send to server, I added some debugs into LWP::Authen::Ntlm.pm. --Performing request now...----------- WWW-Authenticate [DEBUG] CHALLENGE=Negotiate [DEBUG] CHALLENGE=NTLM [DEBUG] SCHEME=ntlm [DEBUG] LWP::Authen::Ntlm [DEBUG] CLASS=LWP::Authen::Ntlm [DEBUG] set authentication.. [DEBUG] AUTH_HEADER=Authorization [DEBUG] AUTH_VALUE=NTLM TlRMTVNTUAABAAAAB7IAAAgACAAgAAAACAAIACgAAAA5NTA4MzEwMXF1YW50YWNu WWW-Authenticate [DEBUG]CHALLENGE=NTLM TlRMTVNTUAACAAAAEAAQADgAAAAFgoECycnz6FvpzbkAAAAAAAAAAI4AjgBIAAAABQLODgAA AA9SAFMAUQBVAEEATgBUAEEAAgAQAFIAUwBRAFUAQQBOAFQAQQABAA4AUQBTAE0AQwBIAFIA NQAEABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAwAoAHEAcwBtAGMAaAByADUALgBSAFMA UQB1AGEAbgB0AGEALgBjAG8AbQAFABgAUgBTAFEAdQBhAG4AdABhAC4AYwvAG0AAAAAAA== [DEBUG] SCHEME=ntlm [DEBUG] LWP::Authen::Ntlm [DEBUG] CLASS=LWP::Authen::Ntlm [DEBUG] set authentication.. [DEBUG] AUTH_HEADER=Authorization [DEBUG]AUTH_VALUE=NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAABAAEABwAAAAEAAQAIAAAAAQABAAkAAAAAAA AABgAAAABYKBAggWbxPxIvlzDJ3hiLQuhjmp+8VEU0lieYvoguMXSUmUvQY71mMp7lBXXTBh JqlKk1IAUwBRAFUAQQBOAFQAQQA5ADUAMAA4ADMAMQAwADEAOQA1ADAAOAAzADEAMAAxAA== WWW-Authenticate [DEBUG] CHALLENGE=Negotiate [DEBUG] CHALLENGE=NTLM [DEBUG] SCHEME=ntlm [DEBUG] LWP::Authen::Ntlm [DEBUG] CLASS=LWP::Authen::Ntlm [DEBUG] set authentication.. [DEBUG] AUTH_HEADER=Authorization [DEBUG] AUTH_VALUE=NTLM TlRMTVNTUAABAAAAB7IAAAgACAAgAAAACAAIACgAAAA5NTA4MzEwMXF1YW50YWNu WWW-Authenticate [DEBUG]CHALLENGE=NTLM TlRMTVNTUAACAAAAEAAQADgAAAAFgoECWRPaIWGggukAAAAAAAAAAI4AjgBIAAAABQLODgAA AA9SAFMAUQBVAEEATgBUAEEAAgAQAFIAUwBRAFUAQQBOAFQAQQABAA4AUQBTAE0AQwBIAFIA NQAEABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAwAoAHEAcwBtAGMAaAByADUALgBSAFMA UQB1AGEAbgB0AGEALgBjAG8AbQAFABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAAAAAA== [DEBUG] SCHEME=ntlm [DEBUG] LWP::Authen::Ntlm [DEBUG] CLASS=LWP::Authen::Ntlm [DEBUG] set authentication.. [DEBUG] AUTH_HEADER=Authorization [DEBUG]AUTH_VALUE=NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAABAAEABwAAAAEAAQAIAAAAAQABAAkAAAAAAA AABgAAAABYKBApvnwms/l/oSG7QYwxDH9VtkT+mnvZk//aMD39V1fDNEA2a0x203q0YrkGeD gGEsdVIAUwBRAFUAQQBOAFQAQQA5ADUAMAA4ADMAMQAwADEAOQA1ADAAOAAzADEAMAAxAA== WWW-Authenticate [DEBUG] CHALLENGE=Negotiate [DEBUG] CHALLENGE=NTLM [DEBUG] SCHEME=ntlm [DEBUG] LWP::Authen::Ntlm [DEBUG] CLASS=LWP::Authen::Ntlm [DEBUG] set authentication.. [DEBUG] AUTH_HEADER=Authorization [DEBUG] AUTH_VALUE=NTLM TlRMTVNTUAABAAAAB7IAAAgACAAgAAAACAAIACgAAAA5NTA4MzEwMXF1YW50YWNu WWW-Authenticate [DEBUG]CHALLENGE=NTLM TlRMTVNTUAACAAAAEAAQADgAAAAFgoECEQHd33XvZEkAAAAAAAAAAI4AjgBIAAAABQLODgAA AA9SAFMAUQBVAEEATgBUAEEAAgAQAFIAUwBRAFUAQQBOAFQAQQABAA4AUQBTAE0AQwBIAFIA NQAEABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAwAoAHEAcwBtAGMAaAByADUALgBSAFMA UQB1AGEAbgB0AGEALgBjAG8AbQAFABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAAAAAA== [DEBUG] SCHEME=ntlm [DEBUG] LWP::Authen::Ntlm [DEBUG] CLASS=LWP::Authen::Ntlm [DEBUG] set authentication.. [DEBUG] AUTH_HEADER=Authorization [DEBUG]AUTH_VALUE=NTLM TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAABAAEABwAAAAEAAQAIAAAAAQABAAkAAAAAAA AABgAAAABYKBAqI0gmLHcwsVZ3yOGHWxQT3j92LAZ7UuGAbjRGP4KgMf9pCCLiAIIUAMEm+l pFbwIVIAUwBRAFUAQQBOAFQAQQA5ADUAMAA4ADMAMQAwADEAOQA1ADAAOAAzADEAMAAxAA== WWW-Authenticate [DEBUG] CHALLENGE=Negotiate [DEBUG] CHALLENGE=NTLM [DEBUG] SCHEME=ntlm [DEBUG] LWP::Authen::Ntlm [DEBUG] CLASS=LWP::Authen::Ntlm [DEBUG] set authentication.. --Done with request------------------- It didn't work!->401 Unauthorized Date: Wed, 12 Oct 2011 09:55:38 GMT Server: Microsoft-IIS/6.0 WWW-Authenticate: Negotiate WWW-Authenticate: NTLM Content-Length: 1251 Content-Type: text/html Client-Date: Wed, 12 Oct 2011 09:59:31 GMT Client-Peer: 10.1.1.1:80 Client-Response-Num: 7 Client-Warning: Credentials for 'domain\user' failed before Title: Äúδ±»ÊÚȨ²é¿´¸ÃÒ³ X-Powered-By: ASP.NET I also posted it at http://perlmonks.org/?node-id=930728 I am wondering if the type3 header send to server is wrong.
From: kssgill [...] hotmail.com
On Wed Oct 12 23:43:21 2011, tiedwu wrote: Show quoted text
> > > I am using NTLM-1.09 to try accessing http server with NTLM > authentication for days, but it doesn’t work so far. > > I am just writting the script follow the example on LWP::Authen::Ntlm: > > <code> > use LWP::UserAgent; > use HTTP::Request::Common; > use LWP::Debug qw(+); > > my $url = ‘http://10.1.1.1’; > my $ua = LWP::UserAgent->new(keep_alive => 1); > $ua->credentials(’10.1.1.1:80’, ‘’, “domain\\user”, ‘passwd’); > > $request = GET $url; > $response = $ua->request($request); > > If ($response->is_success) { > print “It worked \n”; > } else { > print “It didn’t work!->”. $response->status_line. “\n”; > } > exit 0; > > </code> > > The output of the executing is following, it seems failed into > ‘domain\user’ but I am very sure they are definitely correct. For > understand what’s the header received from serve and what’s the
header Show quoted text
> send to server, I added some debugs into LWP::Authen::Ntlm.pm. > > --Performing request now...----------- > WWW-Authenticate > [DEBUG] CHALLENGE=Negotiate > [DEBUG] CHALLENGE=NTLM > [DEBUG] SCHEME=ntlm > [DEBUG] LWP::Authen::Ntlm > [DEBUG] CLASS=LWP::Authen::Ntlm > [DEBUG] set authentication.. > [DEBUG] AUTH_HEADER=Authorization > [DEBUG] AUTH_VALUE=NTLM > TlRMTVNTUAABAAAAB7IAAAgACAAgAAAACAAIACgAAAA5NTA4MzEwMXF1YW50YWNu > WWW-Authenticate > [DEBUG]CHALLENGE=NTLM >
TlRMTVNTUAACAAAAEAAQADgAAAAFgoECycnz6FvpzbkAAAAAAAAAAI4AjgBIAAAABQLODgAA Show quoted text
>
AA9SAFMAUQBVAEEATgBUAEEAAgAQAFIAUwBRAFUAQQBOAFQAQQABAA4AUQBTAE0AQwBIAFIA Show quoted text
>
NQAEABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAwAoAHEAcwBtAGMAaAByADUALgBSAFMA Show quoted text
>
UQB1AGEAbgB0AGEALgBjAG8AbQAFABgAUgBTAFEAdQBhAG4AdABhAC4AYwvAG0AAAAAAA== Show quoted text
> [DEBUG] SCHEME=ntlm > [DEBUG] LWP::Authen::Ntlm > [DEBUG] CLASS=LWP::Authen::Ntlm > [DEBUG] set authentication.. > [DEBUG] AUTH_HEADER=Authorization > [DEBUG]AUTH_VALUE=NTLM >
TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAABAAEABwAAAAEAAQAIAAAAAQABAAkAAAAAAA Show quoted text
>
AABgAAAABYKBAggWbxPxIvlzDJ3hiLQuhjmp+8VEU0lieYvoguMXSUmUvQY71mMp7lBXXTBh Show quoted text
>
JqlKk1IAUwBRAFUAQQBOAFQAQQA5ADUAMAA4ADMAMQAwADEAOQA1ADAAOAAzADEAMAAxAA== Show quoted text
> WWW-Authenticate > [DEBUG] CHALLENGE=Negotiate > [DEBUG] CHALLENGE=NTLM > [DEBUG] SCHEME=ntlm > [DEBUG] LWP::Authen::Ntlm > [DEBUG] CLASS=LWP::Authen::Ntlm > [DEBUG] set authentication.. > [DEBUG] AUTH_HEADER=Authorization > [DEBUG] AUTH_VALUE=NTLM > TlRMTVNTUAABAAAAB7IAAAgACAAgAAAACAAIACgAAAA5NTA4MzEwMXF1YW50YWNu > WWW-Authenticate > [DEBUG]CHALLENGE=NTLM >
TlRMTVNTUAACAAAAEAAQADgAAAAFgoECWRPaIWGggukAAAAAAAAAAI4AjgBIAAAABQLODgAA Show quoted text
>
AA9SAFMAUQBVAEEATgBUAEEAAgAQAFIAUwBRAFUAQQBOAFQAQQABAA4AUQBTAE0AQwBIAFIA Show quoted text
>
NQAEABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAwAoAHEAcwBtAGMAaAByADUALgBSAFMA Show quoted text
>
UQB1AGEAbgB0AGEALgBjAG8AbQAFABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAAAAAA== Show quoted text
> [DEBUG] SCHEME=ntlm > [DEBUG] LWP::Authen::Ntlm > [DEBUG] CLASS=LWP::Authen::Ntlm > [DEBUG] set authentication.. > [DEBUG] AUTH_HEADER=Authorization > [DEBUG]AUTH_VALUE=NTLM >
TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAABAAEABwAAAAEAAQAIAAAAAQABAAkAAAAAAA Show quoted text
>
AABgAAAABYKBApvnwms/l/oSG7QYwxDH9VtkT+mnvZk//aMD39V1fDNEA2a0x203q0YrkGeD Show quoted text
>
gGEsdVIAUwBRAFUAQQBOAFQAQQA5ADUAMAA4ADMAMQAwADEAOQA1ADAAOAAzADEAMAAxAA== Show quoted text
> WWW-Authenticate > [DEBUG] CHALLENGE=Negotiate > [DEBUG] CHALLENGE=NTLM > [DEBUG] SCHEME=ntlm > [DEBUG] LWP::Authen::Ntlm > [DEBUG] CLASS=LWP::Authen::Ntlm > [DEBUG] set authentication.. > [DEBUG] AUTH_HEADER=Authorization > [DEBUG] AUTH_VALUE=NTLM > TlRMTVNTUAABAAAAB7IAAAgACAAgAAAACAAIACgAAAA5NTA4MzEwMXF1YW50YWNu > WWW-Authenticate > [DEBUG]CHALLENGE=NTLM >
TlRMTVNTUAACAAAAEAAQADgAAAAFgoECEQHd33XvZEkAAAAAAAAAAI4AjgBIAAAABQLODgAA Show quoted text
>
AA9SAFMAUQBVAEEATgBUAEEAAgAQAFIAUwBRAFUAQQBOAFQAQQABAA4AUQBTAE0AQwBIAFIA Show quoted text
>
NQAEABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAwAoAHEAcwBtAGMAaAByADUALgBSAFMA Show quoted text
>
UQB1AGEAbgB0AGEALgBjAG8AbQAFABgAUgBTAFEAdQBhAG4AdABhAC4AYwBvAG0AAAAAAA== Show quoted text
> [DEBUG] SCHEME=ntlm > [DEBUG] LWP::Authen::Ntlm > [DEBUG] CLASS=LWP::Authen::Ntlm > [DEBUG] set authentication.. > [DEBUG] AUTH_HEADER=Authorization > [DEBUG]AUTH_VALUE=NTLM >
TlRMTVNTUAADAAAAGAAYAEAAAAAYABgAWAAAABAAEABwAAAAEAAQAIAAAAAQABAAkAAAAAAA Show quoted text
>
AABgAAAABYKBAqI0gmLHcwsVZ3yOGHWxQT3j92LAZ7UuGAbjRGP4KgMf9pCCLiAIIUAMEm+l Show quoted text
>
pFbwIVIAUwBRAFUAQQBOAFQAQQA5ADUAMAA4ADMAMQAwADEAOQA1ADAAOAAzADEAMAAxAA== Show quoted text
> WWW-Authenticate > [DEBUG] CHALLENGE=Negotiate > [DEBUG] CHALLENGE=NTLM > [DEBUG] SCHEME=ntlm > [DEBUG] LWP::Authen::Ntlm > [DEBUG] CLASS=LWP::Authen::Ntlm > [DEBUG] set authentication.. > --Done with request------------------- > It didn't work!->401 Unauthorized > Date: Wed, 12 Oct 2011 09:55:38 GMT > Server: Microsoft-IIS/6.0 > WWW-Authenticate: Negotiate > WWW-Authenticate: NTLM > Content-Length: 1251 > Content-Type: text/html > Client-Date: Wed, 12 Oct 2011 09:59:31 GMT > Client-Peer: 10.1.1.1:80 > Client-Response-Num: 7 > Client-Warning: Credentials for 'domain\user' failed before > Title: Äúδ±»ÊÚȨ²é¿´¸ÃÒ³ > X-Powered-By: ASP.NET > > I also posted it at http://perlmonks.org/?node-id=930728 > > I am wondering if the type3 header send to server is wrong.
I see the same issue... wish it was fixed.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.