From: <Bob...@kp...> - 2002-04-22 21:16:27
|
moo...@pg... wrote: Hi All-- I just started working with Perl-ldap today, so bear with me if this is a silly question. I've got a connection to our LDAP server, and have been able using perl-ldap to go in and get information for users, which is great. However, I also need to authenticate these users..tried just binding as a user + pass, but that didn't work (it seems to just treat this as an anonymous access). So far, I can't find anything about authentication in the faq...should I be looking at another module, or does perl-ldap do authentication and I'm just missing where it's documented? Thanks in advance! Lori Moore Take a look at this -- 162 my $msg = $ldap->bind( 163 dn => $dir_manager, 164 password => $password, 165 ); 166 if ( $msg->code() ) { 167 croak( "$0: LDAP bind to $directory_name failed with ", 168 $msg->code(), " -- ", $msg->error(), "\n" ); 169 } Plug in the fully qualified DN of the user in $dir_manager and the proper password in $password. Hope this helps Bob G |