|
Only superuser (root) is able to "renice" other people's processes.
You could use "sudo" and set the /etc/sudoers file up so that all people in the "admin" group are able
to run "renice" as root.
Downsides:
A. the 'admin' group now can also renice processes of users outside the 'admin' group;
B. each time the group changes (ie users added/deleted), /etc/sudoers will have to be adjusted accordingly,
which is quite inconvenient.
If you want to overcome these options, I think you'll have to write a script that is:
1. given setUID permission;
2. owned by root:admin
3. execute permission only for group admin and user root (owner)
4. placed in a safe directory where only "admin" users have access
5. checks if the processes that are to be renice'd indeed belong to any of the users in the 'admin' group.
The fifth point will be the tricky part, but isn't needed if only want to overcome problem B (above), without solving A.
|