title: Gerrit LDAP configuration
body: <p>I'm trying to configure gerrit to user LDAP, but I'm having some problems with it.</p>
  
  <p>I have the following:</p>
  
  <p><strong>LDAP configuration:</strong></p>
  
  <pre><code>dc=test,dc=com
      cn=admin
      - cn=admins
        - cn=username
      ou=MyTeam
        -cn=developers
          -cn=myusername
  </code></pre>
  
  <p>and I've configured gerrit to use this:</p>
  
  <pre><code>[ldap]
      server = ldap://localhost
      username = myusername
      accountBase = ou=MyTeam,dc=test,dc=com
      groupBase = ou=MyTeam,dc=test,dc=com`
  </code></pre>
  
  <p>and gerrit doesn't allow me to log in with the following error</p>
  
  <blockquote>
    <p><code>ERROR com.google.gerrit.server.auth.ldap.LdapRealm : Cannot query LDAP to authenticate user
    javax.naming.InvalidNameException: [LDAP: error code 34 - invalid DN]</code></p>
  </blockquote>
  
  <p>Can somebody explain me how to set this properly?</p>