add_new_user.sh: change authorized_keys2 -> authorized_keys.
This commit is contained in:
parent
acaa968748
commit
724800e67c
@ -211,16 +211,16 @@ fi
|
|||||||
|
|
||||||
ssh_auhtorized_file=""
|
ssh_auhtorized_file=""
|
||||||
if [[ -d "${templates_base_dir}/${user_name}/.ssh" ]]; then
|
if [[ -d "${templates_base_dir}/${user_name}/.ssh" ]]; then
|
||||||
if [[ -f "${templates_base_dir}/${user_name}/.ssh/authorized_keys2" ]]; then
|
if [[ -f "${templates_base_dir}/${user_name}/.ssh/authorized_keys" ]]; then
|
||||||
ssh_auhtorized_file="${templates_base_dir}/${user_name}/.ssh/authorized_keys2"
|
|
||||||
elif [[ -f "${templates_base_dir}/${user_name}/.ssh/authorized_keys" ]]; then
|
|
||||||
ssh_auhtorized_file="${templates_base_dir}/${user_name}/.ssh/authorized_keys"
|
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
|
fi
|
||||||
elif [[ -d "${templates_all_dir}/.ssh" ]] ; then
|
elif [[ -d "${templates_all_dir}/.ssh" ]] ; then
|
||||||
if [[ -f "${templates_all_dir}/.ssh/authorized_keys2" ]]; then
|
if [[ -f "${templates_all_dir}/.ssh/authorized_keys" ]]; then
|
||||||
ssh_auhtorized_file="${templates_all_dir}/.ssh/authorized_keys2"
|
|
||||||
elif [[ -f "${templates_all_dir}/.ssh/authorized_keys" ]]; then
|
|
||||||
ssh_auhtorized_file="${templates_all_dir}/.ssh/authorized_keys"
|
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
|
||||||
fi
|
fi
|
||||||
if [[ -n "$ssh_auhtorized_file" ]] ; then
|
if [[ -n "$ssh_auhtorized_file" ]] ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user