diff --git a/add_new_user.sh b/add_new_user.sh index e0ff73a..7d933a1 100755 --- a/add_new_user.sh +++ b/add_new_user.sh @@ -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 diff --git a/supported-files/user_templates/all/.ssh/authorized_keys2 b/supported-files/user_templates/all/.ssh/authorized_keys similarity index 100% rename from supported-files/user_templates/all/.ssh/authorized_keys2 rename to supported-files/user_templates/all/.ssh/authorized_keys diff --git a/supported-files/user_templates/axel/.ssh/authorized_keys2 b/supported-files/user_templates/axel/.ssh/authorized_keys similarity index 100% rename from supported-files/user_templates/axel/.ssh/authorized_keys2 rename to supported-files/user_templates/axel/.ssh/authorized_keys diff --git a/supported-files/user_templates/back/.ssh/authorized_keys2 b/supported-files/user_templates/back/.ssh/authorized_keys similarity index 100% rename from supported-files/user_templates/back/.ssh/authorized_keys2 rename to supported-files/user_templates/back/.ssh/authorized_keys diff --git a/supported-files/user_templates/christian/.ssh/authorized_keys2 b/supported-files/user_templates/christian/.ssh/authorized_keys similarity index 100% rename from supported-files/user_templates/christian/.ssh/authorized_keys2 rename to supported-files/user_templates/christian/.ssh/authorized_keys diff --git a/supported-files/user_templates/ilker/.ssh/authorized_keys2 b/supported-files/user_templates/ilker/.ssh/authorized_keys similarity index 100% rename from supported-files/user_templates/ilker/.ssh/authorized_keys2 rename to supported-files/user_templates/ilker/.ssh/authorized_keys diff --git a/supported-files/user_templates/kaya/.ssh/authorized_keys2 b/supported-files/user_templates/kaya/.ssh/authorized_keys similarity index 100% rename from supported-files/user_templates/kaya/.ssh/authorized_keys2 rename to supported-files/user_templates/kaya/.ssh/authorized_keys diff --git a/supported-files/user_templates/lalix/.ssh/authorized_keys2 b/supported-files/user_templates/lalix/.ssh/authorized_keys similarity index 100% rename from supported-files/user_templates/lalix/.ssh/authorized_keys2 rename to supported-files/user_templates/lalix/.ssh/authorized_keys diff --git a/supported-files/user_templates/sysadm/.ssh/authorized_keys2 b/supported-files/user_templates/sysadm/.ssh/authorized_keys similarity index 100% rename from supported-files/user_templates/sysadm/.ssh/authorized_keys2 rename to supported-files/user_templates/sysadm/.ssh/authorized_keys diff --git a/supported-files/user_templates/wadmin/.ssh/authorized_keys2 b/supported-files/user_templates/wadmin/.ssh/authorized_keys similarity index 100% rename from supported-files/user_templates/wadmin/.ssh/authorized_keys2 rename to supported-files/user_templates/wadmin/.ssh/authorized_keys diff --git a/supported-files/user_templates/webadmin/.ssh/authorized_keys2 b/supported-files/user_templates/webadmin/.ssh/authorized_keys similarity index 100% rename from supported-files/user_templates/webadmin/.ssh/authorized_keys2 rename to supported-files/user_templates/webadmin/.ssh/authorized_keys