add_new_user.sh: change authorized_keys2 -> authorized_keys.

This commit is contained in:
Christoph 2019-11-22 12:13:17 +01:00
parent acaa968748
commit 724800e67c
11 changed files with 6 additions and 6 deletions

View File

@ -211,16 +211,16 @@ fi
ssh_auhtorized_file=""
if [[ -d "${templates_base_dir}/${user_name}/.ssh" ]]; then
if [[ -f "${templates_base_dir}/${user_name}/.ssh/authorized_keys2" ]]; then
ssh_auhtorized_file="${templates_base_dir}/${user_name}/.ssh/authorized_keys2"
elif [[ -f "${templates_base_dir}/${user_name}/.ssh/authorized_keys" ]]; then
if [[ -f "${templates_base_dir}/${user_name}/.ssh/authorized_keys" ]]; then
ssh_auhtorized_file="${templates_base_dir}/${user_name}/.ssh/authorized_keys"
elif [[ -f "${templates_base_dir}/${user_name}/.ssh/authorized_keys2" ]]; then
ssh_auhtorized_file="${templates_base_dir}/${user_name}/.ssh/authorized_keys2"
fi
elif [[ -d "${templates_all_dir}/.ssh" ]] ; then
if [[ -f "${templates_all_dir}/.ssh/authorized_keys2" ]]; then
ssh_auhtorized_file="${templates_all_dir}/.ssh/authorized_keys2"
elif [[ -f "${templates_all_dir}/.ssh/authorized_keys" ]]; then
if [[ -f "${templates_all_dir}/.ssh/authorized_keys" ]]; then
ssh_auhtorized_file="${templates_all_dir}/.ssh/authorized_keys"
elif [[ -f "${templates_all_dir}/.ssh/authorized_keys2" ]]; then
ssh_auhtorized_file="${templates_all_dir}/.ssh/authorized_keys2"
fi
fi
if [[ -n "$ssh_auhtorized_file" ]] ; then