Directory Services

Using ldap_simple_bind_s

The ldap_simple_bind_s function queries the LDAP server to authenticate the distinguished name and password provided in its parameters. If the server successfully authenticates the name and password, a binding is completed and the function returns LDAP_SUCCESS. This enables later function calls from this client to read or write directory data, depending on their level of permissions as set by the server.

Caution  This function sends the name and password without encrypting them, and therefore someone eavesdropping on the network could read the password. 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.