LWP:Authen:NTLM

R

Ron T.

I've been looking up on how to use this module, following all the
documentation and cookbooks related to it, and I'm not really sure why
I can't get through. The credentials() function is vaguely described
and I can't really find much info on this.

Is there an alternative to accessing protected files that make use of
Microsoft's NTLM using Perl? I've been looking around awhile to no
avail. If you know something I don't, I'd appreciate the tips!

Ron Thompson
 
G

gf

I've been looking up on how to use this module, following all the
documentation and cookbooks related to it, and I'm not really sure why
I can't get through. The credentials() function is vaguely described
and I can't really find much info on this.

Is there an alternative to accessing protected files that make use of
Microsoft's NTLM using Perl? I've been looking around awhile to no
avail. If you know something I don't, I'd appreciate the tips!

I tried to get it to work too, and gave up.

I ended up using curl to handle the authentication and to move the
data into Perl. Then I could massage it and send it back using curl.

http://en.wikipedia.org/wiki/CURL
 
A

Ayaz Ahmed Khan

"Ron T." typed:
I've been looking up on how to use this module, following all the
documentation and cookbooks related to it, and I'm not really sure why
I can't get through. The credentials() function is vaguely described
and I can't really find much info on this.

Have you tried it? Getting LWP::Authen::Ntlm to work is tricky. I use the
following in production code to authenticate with IIS with NTLM
authentication enabled:

my $ip = '192.168.1.1';
my $port = '443';
# This generally works. If you have domain set up to something else,
# use that, of course.
my $domain = "workgroup";
my $user = 'user';
my $pass = 'pass';
my $useragent = new LWP::UserAgent(keep_alive => 1);
$useragent->credentials("$ip:$port", '', "$domain\\$user", "$pass");

It will help massively if you enable debugging with:

use LWP::Debug qw(+);
 
R

Ron T.

"Ron T." typed:


Have you tried it? Getting LWP::Authen::Ntlm to work is tricky. I use the
following in production code to authenticate with IIS with NTLM
authentication enabled:

my $ip = '192.168.1.1';
my $port = '443';
# This generally works. If you have domain set up to something else,
# use that, of course.
my $domain = "workgroup";
my $user = 'user';
my $pass = 'pass';
my $useragent = new LWP::UserAgent(keep_alive => 1);
$useragent->credentials("$ip:$port", '', "$domain\\$user", "$pass");

It will help massively if you enable debugging with:

use LWP::Debug qw(+);

--
Ayaz Ahmed Khan

A witty saying proves nothing, but saying something pointless gets
people's attention.

Well I gave it a shot, but it's seemingly hopeless. I'm getting the
feeling this kind of method will never work with SharePoint.

If there's a way I'm not sure, it only returns "Unauthorized" for a
response to my requests.
 
A

Ayaz Ahmed Khan

"Ron T." typed:
Well I gave it a shot, but it's seemingly hopeless. I'm getting the
feeling this kind of method will never work with SharePoint.

If there's a way I'm not sure, it only returns "Unauthorized" for a
response to my requests.

I don't know what SharePoint is, but I've got LWP::Authen::NTLM to work
with IIS. The perl code, however, runs on a Linux box in my case.

The description section for LWP::Authen::NTLM on CPAN mentions another
similar module and few incompatible helper modules that need to be watched
out for. It is possible there might be some mismatch or incompatiblity
with regard to that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top