Displaying LDAP content

From lxadm | Linux administration tips, tutorials, HOWTOs and articles
Jump to: navigation, search

To display (remote) LDAP content, use something like below:

# ldapsearch -h -b "ou=Users,dc=example,dc=com" -x -s sub "objectclass=*" \ 
  -W -D "cn=testuser,ou=Users,dc=example,dc=com"

It can be useful when you have trouble connecting to a remote LDAP or Active Directory server.

If no authentication is needed, you can omit the "-W" and "-D" flags.

# ldapsearch -h -b "dc=example,com" -x -s sub "objectclass=*"