Platform SDK: Active Directory, ADSI, and Directory Services |
The bind operation identifies the person (or device or application) that is trying to connect to the server, by providing a distinguished name and some type of authentication credential, such as a password. The exact credentials are dependent on the authentication method being used. You can also bind anonymously by passing NULL parameters.
The ldap_simple_bind functions use a clear text password for authentication. Call ldap_bind or ldap_bind_s to use authentication services, such as the Windows NTŪ LAN Manager (NTLM), distributed password authentication (DPA), or Generic Security Services (GSS) API. For more information on supported authentication services, see ldap_bind.
Note that LDAP 2 requires that a client bind even for an anonymous connection. Not all LDAP implementations enforce this requirement, but you should include the bind step in order to maintain compatibility with all LDAP 2 services.