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 'INFO: User not found'
|
||||||
echo 'Creating...'
|
echo 'Creating...'
|
||||||
useradd -m $USER
|
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
|
fi
|
||||||
|
|
||||||
# cp in all commands and dependencies
|
# cp in all commands and dependencies
|
||||||
@ -23,7 +23,7 @@ for cmd in "${CMDS[@]}"; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# cp user and group into chroot
|
# cp user and group into chroot
|
||||||
mkdir -p $CHROOT/etc
|
mkdir -p $CHROOT/etc/
|
||||||
cat /etc/passwd | grep $USER > $CHROOT/etc/passwd
|
cat /etc/passwd | grep $USER > $CHROOT/etc/passwd
|
||||||
cat /etc/group | grep $USER > $CHROOT/etc/group
|
cat /etc/group | grep $USER > $CHROOT/etc/group
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user