views:

17

answers:

0

My desktop allows remote access. I work locally, sometimes other people log in, using ssh/telnet/ftp/rsh. Their processes get the same priority as my own.

I would like to set priority ('nice' value) of all processes for people logged in remotely to some higher value, e.g. 10. How can I do that?

I tried using pam_group to dynamically assign a group for such people and then pam_limits to set the priority, but there are two problems:

  1. it seems pam_limits does not use/see the group that was set by pam_group. I've checked that the group is set after remote login, and that the priority is correctly changed when limiting username, not dynamically set group.

  2. I'm not sure I can set the limits for all services, like telnet or rsh - at least I haven't seen any files with such name in /etc/pam.d

I can't hardcode list of users in limits.conf, as I'm using NIS. Is there any other way? What I want to achieve is to be able to work without decreased performance caused by other (remote) users...