Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In a server I want all user processes to have 25 as default priority.

My solution was to include the following config in /etc/profile

if [ $USER  != "root" ]; then 
   renice 5 -p $PID $$

There are two problems with this solution:

  • if the user runs the command directly from ssh then the default priority is 20.

    Example: ssh runs with priority 20.

  • if the user uses another shell (zsh for example) default priority isn't being changed.

Any sugestions on how set the default priority for all shells (and for running ssh commands)?


share|improve this question

pam_limits module provides ability to set various restrictions on per-user/per-group selection. You should check man limits.conf for priority.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.