I am looking to authenticate off of zimbra via PHP ldap functions. I am having some issues and not able to authenticate. I am doing this on the same network but from a different server.
server name is : zwm.otelconsulting.com
email:
bleto@otelconsulting.com
domain on zimbra for email: otelconsulting.com
Can anyone give me some direction, or maybe ldap search command to test to see if i can do it via command line on the server.
MY CODE:
Code:
$ldap['user'] = 'bleto@otelconsulting.com';
$ldap['pass'] = 'test111';
$ldap['host'] = 'zwm.otelconsulting.com';
$ldap['port'] = 389;
$ldap['dn']= 'uid='.$ldap['user'].',ou=people,dc=otelconsulting,dc=com';
$ldap['base'] = '';
// connecting to ldap
$ldap['conn'] = ldap_connect( $ldap['host'], $ldap['port'] );
ldap_set_option($ldap['conn'], LDAP_OPT_PROTOCOL_VERSION, 3);
// binding to ldap
$ldap['bind'] = ldap_bind( $ldap['conn'], $ldap['dn'], $ldap['pass'] );
if ($ldap['bind']) {
echo "LDAP bind successful...";
} else {
echo 'no bind';
}