I have Linux machine, Redhat 5.8, that gets data via LDAP. For an unclear reason, I can’t get the data via LDAP. I see that from /var/log/messages and /var/log/secure the problem is that the ldapsearch tool is not installed on my Linux machine, and I can't find the suitable version.

Is there some other alternative to test the LDAP connection?

my ldap.conf

  more /etc/ldap.conf

  logdir /var/log/ldap
  debug 0
  referrals no
  deref never
  nss_getgrent_skipmembers yes
  host server.apple.com
  base DC=apple,DC=com
  uri ldap://server.apple.com/

2 Answers 2


If I were you I would try these:

  1. Find suitable ldapsearch binary, and copy then run it on that system.
  2. make a perl/python script which does the same like the code below:


import ldap
    l = ldap.open("x.x.x.x")
    # put the ldapserver address up there

    l.protocol_version = ldap.VERSION3  

    username = "cn=Manager, o=domain.com"
    # user dn above
    password  = "secret"
    # set the password

    l.simple_bind(username, password)
except ldap.LDAPError, e:
    print e
    # handle error
  • I run it and I not get any outout,? Jun 18, 2015 at 10:29
  • I found your other post, have you tried the RPM which I've addressed there? Jun 18, 2015 at 19:37

Try using Apache Directory Studio. It has tools to test connection, authentication and searching using a GUI and works multi platform.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .