Directory Services

Using ldap_bind

The ldap_bind function is used for asynchronous authentication and binding. LDAP_AUTH_SIMPLE is the only authentication method compatible with this asynchronous binding function. Using another authentication method with ldap_bind will fail and return LDAP_PARAM_ERROR. All other authentication methods require synchronous binding as provided by ldap_bind_s. Like ldap_simple_bind_s, the LDAP_AUTH_SIMPLE method used with the ldap_bind function, requires a name and password transmitted in plaintext.

Caution  This function sends the name and password unencrypted, and therefore can be intercepted. Unless a TLS (SSL) encrypted session has been set up, this function should not be used. For more information about how to set up an encrypted session, see Initializing a Session.