Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
rb:authagainstldap [12/09/2018 22:50]
andrew [Cannot find group info]
rb:authagainstldap [24/07/2019 16:00] (current)
andrew [ldapsearch]
Line 12: Line 12:
 -W prompt for password on screen \\ -W prompt for password on screen \\
  
 +===== Examples =====
 +
 +
 +  ldapsearch -x -W -D  '​cn=Manager,​dc=company,​dc=net'​ -b ""​ -s base -h inet01.fqdn
 +  ​
 +  -x Simple Auth, not SASL
 +  -W Prompt for simple Auth, not on command line
 +  -D Distinguished name to bind with
 +  -b search Base
 +  -s Scope of search, base, onelevel or subtree.
 +  -h Host to search on
 +  ​
 +  eg. to see all users and UID'​s:​-
 +  ldapsearch -x -W -D '​uid=user1,​ou=People,​dc=prod,​dc=company,​dc=net'​ -b '​ou=People,​dc=prod,​dc=company,​dc=net'​ -s onelevel | grep -E '​cn:​|uidN|#​ '
 +  ​
 +  eg. to see just one user:-
 +  ldapsearch -x -W -D '​uid=user1,​ou=People,​dc=prod,​dc=company,​dc=net'​ -b '​cn=testuser,​ou=People,​dc=prod,​dc=company,​dc=net'​ -s base
 +  ​
 +  eg. to get email address for one user:-
 +   ​ldapsearch -x -W -D '​uid=user1,​ou=People,​dc=prod,​dc=company,​dc=net'​ -b '​cn=testuser,​ou=People,​dc=prod,​dc=company,​dc=net'​ -s base mail
 +  Enter LDAP Password:
 +  # extended LDIF
 +  #
 +  # LDAPv3
 +  # base <​cn=testuser,​ou=People,​dc=prod,​dc=company,​dc=net>​ with scope base
 +  # filter: (objectclass=*)
 +  # requesting: mail
 +  #
 +  ​
 +  # testuser, People, prod.company.net
 +  dn: cn=testuser,​ou=People,​dc=prod,​dc=company,​dc=net
 +  mail: test.user@company.com
 +  ​
 +  # search result
 +  search: 2
 +  result: 0 Success
 +  ​
 +  # numResponses:​ 2
 +  # numEntries: 1
 +  ​
 +   
  
  

rb/authagainstldap.txt ยท Last modified: 24/07/2019 16:00 by andrew