title: python-ldap error - {'desc': 'No such object'}
body: <p>So, I am trying to run a search with ldap, and trying to check if I am able to initialize it first. However, I keep getting the error <strong>{'desc': 'No such object'}</strong> I even tried wrong credentials but I don't even get to that error message. If someone could shed light on this, it'd be really helpful. Thanks in advance!</p>
  
  <pre><code>#!/usr/bin/python
  import os, os.path
  import subprocess as sp
  import ldap
  
  l = ldap.initialize('ldap://ldap.domain.com')
  username = "uid=%s,ou=People,dc=domain,dc=com"
  password = "password"
  try:
      l.protocol_version = ldap.VERSION3
      l.simple_bind_s(username, password)
      valid = True
  except Exception, error:
      print error
  except ldap.INVALID_CREDENTIALS:
    print "Your username or password is incorrect."
    sys.exit(0)
  </code></pre>