in reply to Bind to LDAP without password

I used Authen::SASL::Perl::GSSAPI and came up with this:
#!/usr/bin/perl use strict; use warnings; use Net::LDAP; use Authen::SASL; my $adhost = 'http://localhost'; my $ldap_base = 'dc=brbdc1,dc=net'; 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); }; print "\tLDAP bind() succeeded, working in authenticated state\n";

Replies are listed 'Best First'.
Re^2: Bind to LDAP without password
by Sue D. Nymme (Monk) on Jul 30, 2010 at 18:47 UTC

    Well... rats.

    That fails for me on the $ldap->bind line, with error 82, "No SASL mechanism found."

    Digging deeper, I see that I have Authen::SASL::Perl::GSSAPI installed. But it depends on GSSAPI, which I do not have installed, and which I apparently can't install—I am using ActiveState perl, with no C compiler, and I don't see any ppm repository that has GSSAPI.pm.

        No, I can't. This is not a web program.