On a shared server, I would like to have some very low priority users such that whenever an other user (also without root privileges) needs the resources, they can kill any of the low priority users' processes.
Is it possible to allow something like that?
Best Answer
Give the other users permission to kill the processes as the low priority user through
A user can only signal their own processes, unless they have root privileges. By using
sudo -u
a user with the correct set-up in thesudoers
file may assume the identity of the low priority user and kill the process.For example:
This would allow all users in the group
killers
to run/bin/kill
aslowpriouser
.See also the
sudoers
manual on your system.On an OpenBSD system, the same can be done through the native
doas
utility with a configuration likeThen
See the manuals for
doas
anddoas.conf
.