semi-fix sshd_config
This commit is contained in:
parent
50525dc124
commit
8182e30426
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user