What are the other alternative to test a LDAP connection on linux machine
6,360
If I were you I would try these:
- Find suitable ldapsearch binary, and copy then run it on that system.
- make a perl/python script which does the same like the code below:
#
#!/bin/python
import ldap
try:
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
Related videos on Youtube
Comments
-
maihabunash over 1 year
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/
-
maihabunash almost 9 yearsI run it and I not get any outout,?
-
Mehdi Sarmadi almost 9 yearsI found your other post, have you tried the RPM which I've addressed there?