On 7/11/03 11:47 pm, Li, Tina <[EMAIL PROTECTED]> wrote: > Hi, > > I created a Perl script using perl-ldap to search for entries in my LDAP > server (version 2). When I bind to the server with the root DN and root > password, it doesn't seem to bind correctly. That is, the bind method > doesn't seem to authenticate my credentials. It seems as if the bind method > is binding anonymously even though I provided a bind DN and password. If I > search for objects that require root authentication to read, I get no > results back. If I search for objects that can be read with anonymous > binding, I get appropriate results back. I then tried to do the same > search, with the same ldap server, bind DN and password, with a command-line > LDAP search tool. This time I get results back for objects that need root > authentication. Am I missing something in my bind call? I'm sure that my > DN and password are correct as the command line search tool can authenticate > with them. > > As anyone seen this problem? Any help or suggestion is greatly appreciated!
You're probably not passing the DN correctly to bind, which means an anonymous connection will be made instead. This works for me: $res = $ldap->bind( dn => "cn=net,cn=ldap", password => "baz" ); die "Bind failed: ", $res->error_name, "\n" if $res->code; Cheers, Chris