Hi all,
is it possible to use Net::LDAP with SASL mechanism GSSAPI on a Windows
XP machine?
I tried the example from the Authen::SASL::Perl::GSSAPI man page. It
works
perfectly on a Linux machine, but fails on Windows.
---------------------------< schnipp schnapp >--------------------------
#!/usr/bin/perl -w
use strict;
use Net::LDAP 0.33;
use Authen::SASL 2.10;
my $adhost = '<my_dc>';
my $ldap_base = '<my_base>';
my $ldap_filter = '(&(sAMAccountName=HirmkeM))';
my $sasl = Authen::SASL->new(mechanism => 'GSSAPI');
my $ldap;
eval {
$ldap = Net::LDAP->new($adhost,
onerror => 'die')
or die "Cannot connect to LDAP host '$adhost': '$@'";
$ldap->bind(sasl => $sasl);
};
if ($@) {
chomp $@;
die "\nBind error : $@",
"\nDetailed SASL error: ", $sasl->error,
"\nTerminated";
}
print "\nLDAP bind() succeeded, working in authenticated state";
my $mesg = $ldap->search(base => $ldap_base,
filter => $ldap_filter);
---------------------------< schnipp schnapp >--------------------------
perl -S sasltest
Use of uninitialized value in die at q:\entw\perl/sasltest line 24,
<DATA> line 275.
Bind error : No SASL mechanism found
at c:/Anwendungen/Perl/site/lib/Authen/SASL.pm line 74
at q:\entw\perl/sasltest line 19
Detailed SASL error:
Terminated at q:\entw\perl/sasltest line 24, <DATA> line 275.
---------------------------< schnipp schnapp >--------------------------
Any idea?
Do I need something besides Perl and Authen::SASL::Perl?
Perhaps some Kerberos package (MIT or heimdal)?
Thx a lot!
Bye.
Michael.