Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'slight problem...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
slight problem...
Authored by: MattHaffner on Jan 06, '04 11:36:47AM
The hitch with renice-ing is that the user can't restore their processes to the proper level without sudo privileges. You are only allowed to increase your own process nice level, not decrease it.

If you allow all your users to have sudo then it's not an issue, and you could hook a "renice 10 -u $userID" in before the -switchTouserID line. The script will always have to be run 'sudo', of course.

[ Reply to This | # ]

slight problem...
Authored by: SOX on Jan 06, '04 05:00:54PM

Maybe one could just make this a setUID executable with the owner as root and executable by all. If that were done then you could also use the root priviledge to set the nice level of the incoming user to 0 or 10 or something good in the same script.
that is add:

renice 10 -u $1
to the end.

[ Reply to This | # ]