aboutsummaryrefslogtreecommitdiffstats
path: root/nagios-plugins/check_ldap_root
diff options
context:
space:
mode:
Diffstat (limited to 'nagios-plugins/check_ldap_root')
-rwxr-xr-xnagios-plugins/check_ldap_root7
1 files changed, 7 insertions, 0 deletions
diff --git a/nagios-plugins/check_ldap_root b/nagios-plugins/check_ldap_root
index a4ce47f..64c78f8 100755
--- a/nagios-plugins/check_ldap_root
+++ b/nagios-plugins/check_ldap_root
@@ -15,6 +15,13 @@ fi
ldapserver=$1
shift
+if type ldapsearch > /dev/null 2>&1 ; then
+ :
+else
+ echo "Missing the ldapsearch tool, unable to check LDAP server."
+ exit 2
+fi
+
if ldapsearch -l 3 -LLL -h $ldapserver -x -b '' -s base > /dev/null 2>&1 ; then
echo "OK - Searching for LDAP root DSE worked on $ldapserver"
exit 0