How to set the default process scheduling priority (“good” value) for all users with a remote protocol?

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

I would like to set the priority ("pleasant" value) of all processes for people registered remotely to some higher value, for example. 10. How can I do this?

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

  • It seems pam_limits is not using / not seeing the group that pam_group set. I checked that the group was configured after remote login, and that the priority changes correctly when restricting the username, rather than dynamically setting the group.

  • I'm not sure that I can set limits for all services such as telnet or rsh, at least I have not seen files with that name in /etc/pam.d

I cannot list the users in the limits.conf file since I am using NIS. Is there any other way? What I want to achieve is to work without degrading the performance caused by other (remote) users ...

+3
source share
2 answers

( ) /etc/security/limits.conf. :

#<domain>      <type>  <item>         <value>
mary           hard    priority       15

, <item> priority, nice, .

+1

, "renice". user/group, /.

, . , , -.

0

Source: https://habr.com/ru/post/1762276/


All Articles