Advertisement
Guest User

Untitled

a guest
May 13th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. from ldap3 import Server, Connection, ALL
  2.  
  3. # define the server
  4. s = Server('ldap://ldap.abcd.com:389', get_info=ALL)
  5.  
  6. # define the connection
  7. c = Connection(s, user='cn=Manager,dc=mydomain,dc=com', password='Super1')
  8.  
  9. # perform the Add operation
  10. c.add('uid=user3,ou=People,dc=abcd,dc=com',['person','organizationalPerson','inetOrgPerson', 'posixGroup', 'top','shadowAccount'], {'givenName': 'user3firstname','sn': 'user3lastname', 'uidNumber' : 520,'gidNumber' : 521,'uid': 'user3','cn': 'user3user3lastname'})
  11.  
  12. # close the connection
  13. c.unbind()
  14.  
  15. LDAPSocketOpenError at /adminservice/users/
  16. unable to send message, socket is not open
  17. Request Method: GET
  18. Request URL: http://127.0.0.1:8000/adminservice/users/
  19. Django Version: 1.8.4
  20. Exception Type: LDAPSocketOpenError
  21. Exception Value:
  22. unable to send message, socket is not open
  23. Exception Location: C:Python35libsite-packagesldap3strategybase.py in send, line 299
  24. Python Executable: C:Python35python.exe
  25. Python Version: 3.5.1
  26. Python Path:
  27. ['D:\sourcecode\idp',
  28. 'D:\sourcecode\utils-drf-public-api',
  29. 'C:\Python26',
  30. 'C:\Python35\python35.zip',
  31. 'C:\Python35\DLLs',
  32. 'C:\Python35\lib',
  33. 'C:\Python35',
  34. 'C:\Python35\lib\site-packages']
  35. Server time: Fri, 13 May 2016 17:02:08 +0700
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement