Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
perun-proxy-utils
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Perun
Perun ProxyIdP
perun-proxy-utils
Commits
7e6f876f
Commit
7e6f876f
authored
5 years ago
by
Pavel Vyskočil
Browse files
Options
Downloads
Patches
Plain Diff
Added new script for ldap_status check
parent
567b9056
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+27
-0
27 additions, 0 deletions
README.md
ldap_status.sh
+32
-0
32 additions, 0 deletions
ldap_status.sh
with
59 additions
and
0 deletions
README.md
+
27
−
0
View file @
7e6f876f
...
...
@@ -57,6 +57,33 @@ instanceName=""
proxyDomainName="login.elixir-czech.org"
</pre>
### ldap_status.sh
This script checks if the LDAP servers are accessible
*
Requirements:
*
library
*ldap-utils*
<pre>
apt-get install ldap-utils
</pre>
*
Attributes to be filled:
<pre>
# LDAP username
user=""
# LDAP password
password=""
# Base dn of LDAP tree
basedn=""
# eduPersonPrincipalName which will be searched
searchedIdentity=""
# List of LDPA hostnames separated by space
# Included ldap:// or ldaps://
hostnames=""
</pre>
## List of plugins
Plugins are located in /usr/lib/check_mk/plugins/
...
...
This diff is collapsed.
Click to expand it.
ldap_status.sh
0 → 100755
+
32
−
0
View file @
7e6f876f
#!/bin/bash
# LDAP username
user
=
""
# LDAP password
password
=
""
# Base dn of LDAP tree
basedn
=
""
# eduPersonPrincipalName which will be searched
searchedIdentity
=
""
# List of LDPA hostnames separated by space
# Included ldap:// or ldaps://
hostnames
=
""
for
hostname
in
$hostnames
do
if
[[
-z
$password
]]
;
then
ldapresult
=
$(
ldapsearch
-x
-H
$hostname
-b
$basedn
"(eduPersonPrincipalNames=
$searchedIdentity
)"
2>&1
)
else
ldapresult
=
$(
ldapsearch
-x
-H
$hostname
-D
$user
-w
$password
-b
$basedn
"(eduPersonPrincipalNames=
$searchedIdentity
)"
2>&1
)
fi
result
=
$?
if
[[
$result
==
0
]]
;
then
echo
"0 ldap_status-
$hostname
- OK"
else
echo
"2 ldap_status-
$hostname
-
$ldapresult
"
fi
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment