We allow users to execute scripts on our servers. Our security model involves chrooting them. We want to be able to apply ulimit restrictions to them, and the best way to do it would seem to be in
But, it doesn't seem to work. Here's what we set in
@registered_users - priority 7 @registered_users - nice 7 * - priority 9 * - nice 9
And it works in some cases:
sudo -u testuser python
Will give a python process with niceness 9 (not 7, annoyingly)
sudo chroot --userspec=testuser:registered_users python
gives a python process with niceness 0.
We've tried adding
session required pam_limits.so to
/etc/pam.d/common-session, to no avail.