CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Connect to LDAP using perl

 



raoperl
New User

Mar 2, 2011, 5:10 AM

Post #1 of 1 (608 views)
Connect to LDAP using perl Can't Post

HI All,

I have written a small script for connecting to my activeDirectry.But i m getting below error.Please help me..

000004DC: LdapErr: DSID-0C0906DC, comment: In order to perform this operation a
successful bind must be completed on the connection., data 0, v1db0 at C:\Perl\
LDAP.pl line 9, <DATA> line 522.

my script is :

---------

use Net::LDAP;
$domain="dc=ds,dc=company,dc=net";
$ldap = Net::LDAP->new(vcn.ds.xxxx.net) or die "$@";
$ldap->bind(dn=>$domain,username=>'tin2000x',password=>'xxxxx') or die "$@";
my($mesg) =$ldap->search(base=>$domain,filter=>'(userid=2000)');
$mesg->code && die $mesg->error;
$mesg = $ldap->unbind; # take down session

--------

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives