in reply to Re: NTLM authentication with IIS 6
in thread NTLM authentication with IIS 6

Have you tried LWP::Authen::Ntlm? It seems like such a good fit.

LWP::Authen::Ntlm uses Authen::NTLM, and neither should need to be explicitly included in the script, as the type of authentication is detected and the NTLM libraries are auto-included.

Update: Except that it doesn't detect NTLM V1 vs V2, so Authen::NTLM does need to be explicitly included (see below).

Replies are listed 'Best First'.
Re^3: NTLM authentication with IIS 6
by mrlizard123 (Novice) on Apr 17, 2013 at 01:18 UTC

    LWP::Authen::Ntlm uses Authen::NTLM, and neither should need to be explicitly included, as the type of authentication is detected and the NTLM libraries are auto-included.

    If I do not explicitly use Authen:NTLM I get:

    Undefined subroutine &main::ntlmv2

    Whether I specify them or not in the suggestion by Khen1950fx I still get response code of '500' with content:

    <html><head><title>Error</title></head><body>The function requested is + not supported </body></html>
      If I do not explicitly use Authen:NTLM I get:...

      Ah, I didn't see that function (Khen1950fx appears to have missed it also). Authen::NTLM exports the function ntlmv2(), which sets the module so that it uses V2 (so Authen::NTLM appears to be required explicitly)...I might have noticed if you explicitly exported the function:

      use Authen::NTLM qw(ntlmv2); ... ntlmv2(1);
      Not that this will fix your problem...the 500 error is probably a result of not using V2.

      If I do not explicitly use Authen:NTLM I get: Undefined subroutine &main::ntlmv2

      Remove ntlmv2(); from your program and try again