summaryrefslogtreecommitdiff
path: root/ssh-keys.sh
diff options
context:
space:
mode:
authorMarkus Krogh <markus@nordu.net>2018-12-06 16:01:39 +0100
committerMarkus Krogh <markus@nordu.net>2018-12-06 16:01:39 +0100
commitb3efd66227ee5c2bf9047deb5204edaad13849bb (patch)
tree399473b3a062bd327b09fcd0e0c4148f72b2974c /ssh-keys.sh
parentf708340132d2d881ac61b7ff4eb6bc055281ef43 (diff)
Put ignoreList into separate file
Diffstat (limited to 'ssh-keys.sh')
-rw-r--r--ssh-keys.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/ssh-keys.sh b/ssh-keys.sh
index e628bbb..aec31c0 100644
--- a/ssh-keys.sh
+++ b/ssh-keys.sh
@@ -8,6 +8,10 @@ fi
sunetEmpl="leif leifj lundberg linus per john"
ignoreList="ndn-eduix nunoc"
+if [ -f /opt/cf-repalce-ignore ]; then
+ ignoreList=$(cat /opt/cf-repalce-ignore)
+fi
+
for userHome in /home/*; do
user=$(basename "$userHome")
keys_raw=$(/usr/bin/ldapsearch -o nettimeout=5 -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=$user))" sshPublicKey)