title: ldap3 bind failed when CN and DisplayName are different
body: <p>I'm new to python LDAP and need to do a search in LDAP, but</p>
  
  <blockquote>
    <p>When the user's CN and DisplayName are different, I can only connect with <code>Domain\user</code>. </p>
  </blockquote>
  
  <p>See below: </p>
  
  <ul>
  <li><code>ldap3.Connection(s, user=user_cn, ....</code> Failed, </li>
  <li><code>ldap3.Connection(s, user=user_domain, ....</code> Succeeded</li>
  </ul>
  
  <pre class="lang-sh prettyprint-override"><code>&gt;&gt;&gt; import ldap3
  &gt;&gt;&gt;
  &gt;&gt;&gt; ADDRESS = 'LDAP://192.168.26.10:389'
  &gt;&gt;&gt; user_cn = 'xxx test'
  &gt;&gt;&gt; user_domain = 'domain\xxx.test'
  &gt;&gt;&gt; password = 'password'
  &gt;&gt;&gt; s = ldap3.Server(ADDRESS, get_info=ldap3.ALL)
  &gt;&gt;&gt; c = ldap3.Connection(s, user=user_cn, password=password, auto_bind=True)
  Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
    File "/usr/local/lib/python3.5/dist-packages/ldap3/core/connection.py", line 325, in __init__
      self.do_auto_bind()
    File "/usr/local/lib/python3.5/dist-packages/ldap3/core/connection.py", line 353, in do_auto_bind
      raise LDAPBindError(self.last_error)
  ldap3.core.exceptions.LDAPBindError: automatic bind not successful - invalidCredentials
  &gt;&gt;&gt; c.extend.standard.who_am_i()
  Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
  NameError: name 'c' is not defined
  &gt;&gt;&gt;
  &gt;&gt;&gt; c = ldap3.Connection(s, user=user_domain, authentication = ldap3.NTLM,password=password, auto_bind=True)
  &gt;&gt;&gt; c.extend.standard.who_am_i()
  'u:domain\\xxx.test'
  &gt;&gt;&gt;
  </code></pre>
  
  <p>It's ok to use domain/user to connect and bind(),<br>
  but when I do the search, I still need the CN in search_base.<br>
  Too much trouble to ask user's domain &amp; CN &amp; password, is there anyone can help me.<br>
  Thanks!</p>
  
  <blockquote>
    <p>ldap3 = 2.6<br>
    Python = 3.5.2</p>
  </blockquote>