semi-fix sshd_config

This commit is contained in:
Oliver Atkinson 2023-12-14 02:03:46 -07:00
parent 50525dc124
commit 8182e30426

View File

@ -11,7 +11,7 @@ if ! id "$USER" 2&>/dev/null; then
echo 'INFO: User not found'
echo 'Creating...'
useradd -m $USER
printf "Match User $USER\n ChrootDirectory $CHROOT$CHROOT" >> /etc/ssh/sshd_config.d/70-$USER.conf
printf "Match User $USER\n ChrootDirectory $CHROOT$CHROOT" > /etc/ssh/sshd_config.d/70-$USER.conf
fi
# cp in all commands and dependencies
@ -23,7 +23,7 @@ for cmd in "${CMDS[@]}"; do
done
# cp user and group into chroot
mkdir -p $CHROOT/etc
mkdir -p $CHROOT/etc/
cat /etc/passwd | grep $USER > $CHROOT/etc/passwd
cat /etc/group | grep $USER > $CHROOT/etc/group