Change default backup user shell from /bin/sh to /bin/bash for compatibility reasons
This commit is contained in:
parent
5a8bf42c05
commit
fcbb1ddecd
|
@ -19,7 +19,7 @@ remote_username="$2"
|
||||||
ssh_key_file="$3"
|
ssh_key_file="$3"
|
||||||
local_username="${remote_hostname}-${remote_username}"
|
local_username="${remote_hostname}-${remote_username}"
|
||||||
|
|
||||||
useradd -G backup -b "${BACKUP_ROOT}" -m -k /etc/rs-skel -p '*' -s /bin/sh "${local_username}"
|
useradd -G backup -b "${BACKUP_ROOT}" -m -k /etc/rs-skel -p '*' -s /bin/bash "${local_username}"
|
||||||
rs-update-passwd
|
rs-update-passwd
|
||||||
|
|
||||||
# Generate config files from templates
|
# Generate config files from templates
|
||||||
|
|
|
@ -8,4 +8,4 @@ if [ "${BACKUP_ROOT}" == "" ] || [ "$(realpath ${BACKUP_ROOT})" == "/" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat /etc/passwd | grep "::${BACKUP_ROOT}/[^/:]\+:/bin/sh$" > "${BACKUP_ROOT}/etc/passwd"
|
cat /etc/passwd | grep "::${BACKUP_ROOT}/[^/:]\+:/bin/[^:]\+$" > "${BACKUP_ROOT}/etc/passwd"
|
||||||
|
|
Loading…
Reference in New Issue