camel@camelbox:~$ cat ldaptest.pl use strict; use warnings; use Net::LDAP; my $host = 'xxx.xxx.xxx.xxx'; my $ldap = Net::LDAP->new( $host ) or die "LDAP connect failed for: " . $host; my $mesg = $ldap->bind( "cn=Test User,ou=user,ou=accounts,ou=our,dc=our,dc=domain,dc=com" , password => 'password', ); warn "LDAP response when binding: " . $mesg->error; my $srch = $ldap->search( base => "c=US", # perform a search filter => "(&(sn=Barr)(o=Texas Instruments))" ); camel@camelbox:~$ perl ldaptest.pl LDAP response when binding: Success at ldaptest.pl line 13, line 755. camel@camelbox:~$