#!/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";
In reply to Re: Bind to LDAP without password
by Khen1950fx
in thread Bind to LDAP without password
by Sue D. Nymme
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |