This is with Ubuntu Server 20.04. Here's my terminal session:
joek@comp1:/home/user4$ sudo usermod -R /home/user4 user4
usermod: user 'user4' does not exist
joek@comp1:/home/user4$ sudo useradd user4
useradd: user 'user4' already exists
joek@comp1:/home/user4$ grep user4 /etc/passwd
user4:1010:1011::/home/user4:/bin/sh
joek@comp1:/home/user4$ grep user4 etc/passwd
user4:1010:1011::/home/user4:/bin/sh
I couldn't find an answer anywhere. How can I chroot the user into /home/user4
?
Edit:
I haven't created a chroot. I only have a directory with /bin
, /home
, etc.
The user is used by rsync
on someone else's computer to send backups to my computer. I don't want them to have access to everything on my computer.