diff --git a/bin/authorized_key_location_change.sh.sh b/bin/authorized_key_location_change.sh.sh index fe40f0e..6c928a4 100755 --- a/bin/authorized_key_location_change.sh.sh +++ b/bin/authorized_key_location_change.sh.sh @@ -102,14 +102,14 @@ while read user_home; do ssh_key_diff=$(diff -u "${home_folder}/.ssh/authorized_keys" "${SSH_CENTRAL_AUTHORIZED_FILE_FOLDER}/${username}"); if [ -z "${ssh_key_diff}" ]; then printf "${PRINTF_INFO}" "REMOVE" "-" "${username}" ".ssh/authorized_keys"; - if [ ${TEST} -eq 0 ]; then - if [ ${master_user} -eq 0 ]; then + if [ ${master_user} -eq 0 ]; then + if [ ${TEST} -eq 0 ]; then rm "${home_folder}/.ssh/authorized_keys"; else - echo "[!] No delete for master user, must be done manually"; + echo "$> rm \"${home_folder}/.ssh/authorized_keys\""; fi; else - echo "$> rm \"${home_folder}/.ssh/authorized_keys\""; + echo "[!] No delete for master user, must be done manually"; fi; continue; fi;