Skip to content

Instantly share code, notes, and snippets.

@mfilipe
Created May 16, 2017 22:40
Show Gist options
  • Save mfilipe/f07e199441e439b99700b8af3f3dc107 to your computer and use it in GitHub Desktop.
Save mfilipe/f07e199441e439b99700b8af3f3dc107 to your computer and use it in GitHub Desktop.
pyldap test
import ldap
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW)
conn = ldap.initialize('ldaps://ldap.company.com:636')
conn.protocol_version = ldap.VERSION2
conn.simple_bind_s('[email protected]', 'password')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment