https://github.com/python-ldap/python-ldap

Quick usage example:

import ldap
l = ldap.initialize("ldap://my_ldap_server.my_domain")
l.simple_bind_s("","")
l.search_s("o=My Organisation, c=AU", ldap.SCOPE_SUBTREE, "objectclass=*")

参考脚本:https://www.ibm.com/developerworks/cn/aix/library/au-ldap_crud/index.html

注意将ldap.open改成ldap.initialize(),否则会报module 'ldap' has no attribute 'open'

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-03-27
  • 2021-08-03
  • 2021-08-20
  • 2021-10-10
  • 2021-12-25
  • 2020-03-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案