Hey all, I have an AD server that does not allow people to bind anonymously. I am trying to bind to the server using principal credentials (i.e., user@domain, password) just for searching. I can do it with LDAP browser, anyone know how to do it with Net::LDAP?
This is what I have (does not work):
my $mesg = $ldap->bind(principal=>'bob@domain', password=>"$password");
I can do this using full DN, but multiple users use this script, so using full DN is much more complicated than just username, since many people do not know their full DN.
UPDATE:
Thank you for the help! I figured it out, just figured I'd share how I had done it...
my $mesg = $ldap->bind("$username\@domain", password=>"$password");