aboutsummaryrefslogtreecommitdiff
path: root/systems/dilion/ssh_ldap_regular.sh
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 15:25:35 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 16:16:53 +0200
commit877f7bf7a17f44bd17dd1f0bbfd88abdab67ad72 (patch)
treec47e5037b7071696a9abfbab2c99281885ce36b5 /systems/dilion/ssh_ldap_regular.sh
parentccae7987be59b8a30e98f0429bd78479f6f7c7bc (diff)
downloadNix-877f7bf7a17f44bd17dd1f0bbfd88abdab67ad72.tar.gz
Nix-877f7bf7a17f44bd17dd1f0bbfd88abdab67ad72.tar.zst
Nix-877f7bf7a17f44bd17dd1f0bbfd88abdab67ad72.zip
Hardcode ssh keys for normal login
Diffstat (limited to 'systems/dilion/ssh_ldap_regular.sh')
-rw-r--r--systems/dilion/ssh_ldap_regular.sh19
1 files changed, 0 insertions, 19 deletions
diff --git a/systems/dilion/ssh_ldap_regular.sh b/systems/dilion/ssh_ldap_regular.sh
deleted file mode 100644
index 4c2f47e..0000000
--- a/systems/dilion/ssh_ldap_regular.sh
+++ /dev/null
@@ -1,19 +0,0 @@
1### This snippet is not standalone and must be integrated in the global ldap_authorized_keys.sh
2LDAP_MEMBER="cn=users,cn=ssh,ou=services,dc=immae,dc=eu"
3
4ldap_search '(&(memberOf='$LDAP_MEMBER')('$KEY'=*)(uid='$user'))' $KEY | \
5 while read line ;
6 do
7 if [ ! -z "$line" ]; then
8 if [[ $line == dn* ]]; then
9 user=$(sed -n 's/.*uid=\([^,]*\).*/\1/p' <<< "$line")
10 elif [[ $line == $KEY* ]]; then
11 key=$(clean_key_line ssh "$line")
12 if [ ! -z "$key" ]; then
13 if [[ $key != *$'\n'* ]] && [[ $key == ssh-* ]]; then
14 echo $key
15 fi
16 fi
17 fi
18 fi
19 done