37

How do I get the ldapsearch on Scientific Linux?

I am trying to find the ldapsearch client for Scientific Linux but cannot find how to install the client in order to do LDAP queries.

TheCleaner
  • 32,627
  • 26
  • 132
  • 191
techsjs2012
  • 545
  • 2
  • 6
  • 10
  • Since SL is based on RHEL wouldn't the install info for ldapsearch on RHEL work? http://linux.die.net/man/1/ldapsearch You may also look at OpenLDAP and see if that gets you the search tool you like. – TheCleaner Dec 18 '12 at 17:26

2 Answers2

70

Use yum whatprovides to see what package provides a file. The following was run on SL6.x:

$ yum whatprovides */ldapsearch
...
openldap-clients-2.4.23-15.el6.x86_64 : LDAP client utilities
Matched from:
Filename    : /usr/bin/ldapsearch
Stefan Lasiewski
  • 23,667
  • 41
  • 132
  • 186
16

It's part of the openldap-clients package, so yum install openldap-clients.

The package contents are thus:

$ repoquery -lq openldap-clients
/usr/bin/ldapadd
/usr/bin/ldapcompare
/usr/bin/ldapdelete
/usr/bin/ldapexop
/usr/bin/ldapmodify
/usr/bin/ldapmodrdn
/usr/bin/ldappasswd
/usr/bin/ldapsearch
/usr/bin/ldapurl
/usr/bin/ldapwhoami
/usr/share/man/man1/ldapadd.1.gz
/usr/share/man/man1/ldapcompare.1.gz
/usr/share/man/man1/ldapdelete.1.gz
/usr/share/man/man1/ldapexop.1.gz
/usr/share/man/man1/ldapmodify.1.gz
/usr/share/man/man1/ldapmodrdn.1.gz
/usr/share/man/man1/ldappasswd.1.gz
/usr/share/man/man1/ldapsearch.1.gz
/usr/share/man/man1/ldapurl.1.gz
/usr/share/man/man1/ldapwhoami.1.gz
cjc
  • 24,916
  • 3
  • 51
  • 70