I've been reading about cgroups because I want to create a resource-limited sandbox on an embedded linux machine. As I understand it, given a binary that we want to run in isolation we can launch it as a member of some cgroup that we define. We can also move currently running processes into some cgroup.
But from googling and looking through the Red Hat cgroups tutorial, it isn't clear to me if I can create a new user (or user group) and say "I want all processes spawned by user A to be placed in this and this cgroup automatically".
For example, I'd like to allow clients to ssh user_x@mymachine
and have all processes created during the ssh session assigned to some cgroup. Is this possible?