X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fssh%2Fldap_regular.sh;fp=modules%2Fprivate%2Fssh%2Fldap_regular.sh;h=0000000000000000000000000000000000000000;hb=1a64deeb894dc95e2645a75771732c6cc53a79ad;hp=4c2f47e9cb00bf77f6e52007fece19e8fe351b04;hpb=fa25ffd4583cc362075cd5e1b4130f33306103f0;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/ssh/ldap_regular.sh b/modules/private/ssh/ldap_regular.sh deleted file mode 100644 index 4c2f47e..0000000 --- a/modules/private/ssh/ldap_regular.sh +++ /dev/null @@ -1,19 +0,0 @@ -### This snippet is not standalone and must be integrated in the global ldap_authorized_keys.sh -LDAP_MEMBER="cn=users,cn=ssh,ou=services,dc=immae,dc=eu" - -ldap_search '(&(memberOf='$LDAP_MEMBER')('$KEY'=*)(uid='$user'))' $KEY | \ - while read line ; - do - if [ ! -z "$line" ]; then - if [[ $line == dn* ]]; then - user=$(sed -n 's/.*uid=\([^,]*\).*/\1/p' <<< "$line") - elif [[ $line == $KEY* ]]; then - key=$(clean_key_line ssh "$line") - if [ ! -z "$key" ]; then - if [[ $key != *$'\n'* ]] && [[ $key == ssh-* ]]; then - echo $key - fi - fi - fi - fi - done