[Date Prev][Date Next] [Chronological] [Thread] [Top]

Authen::SASL problems

i'm having some issues with the Authen::SASL module and OpenLDAP.  I can
get selfwrite permission according to my ACLs just fine through SASL if
i just type ldapmodify with the proper extensions into the terminal
command line; That is, i can authenticate using the CRAM-MD5 method just
fine off the command line.  But when i try to have it authenticate using
a perl script, things go horribly wrong - unfortunately, SASL support
for perl scripts is a must for my current projects at Internet2/UCAID,
so i can't just abandon it.  So anyway, here's my little test program
for attempting to bind to the LDAP server - when i run this program it
returns a 'failed with 80' message.  So, number one, can someone tell me
what an error 80 is?  the nearest i can tell it looks like there's
something it can't find on the database that it wants to.  Number two,
can someone tell me how to fix my syntax to make this thing work???  As
far as i know i'm running the most recent packages of Net::LDAP, perl,
and OpenLDAP on Red Hat 7.2 ( i think).



use Net::LDAP qw(:all);
use Net::LDAP::Util qw(ldap_error_name
use Authen::SASL;

$pass = "secret";
$DN = "uid=asaltsma";

my $ldap = new Net::LDAP('www.myserver.com');

$sasl = Authen::SASL->new('CRAM-MD5', password => $pass);

my $mesg = $ldap->bind( $DN, sasl => $sasl, version => 3);

die ("failed to bind with ",$mesg->code(),"\n") if $mesg->code();

$ldap>unbind( $DN );


Thanks ahead of time...

Adam Saltsman
Internet Software Development Intern