anchor.diff:  ldappasswd -x -D cn=admin,dc=gocd,dc=org -W -S "uid=john,ou=People,dc=gocd,dc=org"
   ~~~
   
  +
   ##**Step 3 — Setup LDAP authentication for GoCD**
   
   This configuration will help you connect to the  OpenLDAP server you setup.
   
   <img src="/assets/images/blog/cd-hacks/gocd-authorize-config-ldap.gif" alt="Open LDAP with GoCD"/>
   
  +
   [Screenshot of the GoCD LDAP authentication setup]
   
   <img src="/assets/images/blog/cd-hacks/gocd-add-auth-ldap.png" alt="Open LDAP with GoCD"/>
  +
   
   Users can also configure this via **Config XML** tab on the Admin section:
   
  
positive.code: adding new entry  "uid=john,ou=People,dc=gocd,dc=org"
  ~~~
  
  Check if the user is successfully added.
  
  ~~~ shell
  ldapsearch -x -LLL -b dc=gocd,dc=org 'uid=john' cn gidNumber
  ~~~
  
  **Output**
  
  ~~~ shell
  ldapsearch -x -LLL -b dc=gocd,dc=org 'uid=john' cn gidNumber
  
negative.code: userPassword: badger
  ~~~
  
  Execute below command to add user to LDAP:
  
  ~~~ shell
  ldapadd -x -D cn=admin,dc=gocd,dc=org -W -f add.ldif
  ~~~
  
  Output:
  
  ~~~ shell
  ldapadd -x -D cn=admin,dc=gocd,dc=org -W -f add.ldif
  