I have regular users who are not SSH'd into a machine but are accessing the machine directly. How can I lock them into their home directory or any directory? At the moment they can successfully run rm -rf /
. They can also run all sorts of dangerous commands. I normally use the ssh config to lock them in but this is not that situation.
In my situation the user is accessing the command line through a web interface. It is a docker container that is removed as soon as the user is done with it. I am trying to prevent the user from "escaping" the container since docker containers are not necessarily as "secure" as VMs.