summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Krogh <markus@nordu.net>2018-06-06 14:07:37 +0200
committerMarkus Krogh <markus@nordu.net>2018-06-06 14:07:37 +0200
commit067a3e6cd9fe2d77884871fcdb9f61cada451c94 (patch)
tree76c0a969f8e9d158633931b172466972193a325e
parent382b226fd44796a1dbff6219c348afe8f90a8d40 (diff)
Move ldapsearch check
-rwxr-xr-xinstall.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/install.sh b/install.sh
index d7c3308..b1f937f 100755
--- a/install.sh
+++ b/install.sh
@@ -19,10 +19,11 @@ if ! which ldapsearch >> /dev/null; then
echo "Failed to install ldap-utils"
exit 1
fi
- if ! ldapsearch -o nettimeout=2 -o ldif-wrap=no -LLL -x -H "ldaps://ldap.nordu.net" -b "ou=people,dc=nordu,dc=net" "(&(employeeType=employee)(memberof=cn=ndn-sysadmin,ou=groups,dc=nordu,dc=net)(sshPublicKey=*)(uid=markus))" uid >> /dev/null; then
- echo "Failed to perform ldapsearch"
- exit 1
- fi
+fi
+
+if ! ldapsearch -o nettimeout=2 -o ldif-wrap=no -LLL -x -H "ldaps://ldap.nordu.net" -b "ou=people,dc=nordu,dc=net" "(uid=markus)" uid >> /dev/null; then
+ echo "Failed to perform ldapsearch"
+ exit 1
fi
if ! curl -s --show-error "$SSH_URL" > "$SSH_KEYS_PATH"; then