LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-24-2006, 12:48 AM   #1
321
LQ Newbie
 
Registered: Jul 2005
Posts: 14

Rep: Reputation: 0
Allow User to Set Priority


Is there a way to allow a non-root user to set the priority of a program?
 
Old 07-24-2006, 01:09 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by 321
Is there a way to allow a non-root user to set the priority of a program?
A regular user can decrease priorty (increase "niceness") but not increase it for his own processes. Take a look at the nice and renice commands. I believe a normal user can also do this from within the top command.

You can also give a normal user the ability to run renice as root in the sudoers file. Whether that is a good idea is another question.

Last edited by blackhole54; 07-24-2006 at 01:12 AM.
 
Old 07-24-2006, 01:10 AM   #3
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
try sudo, maybe?
 
Old 07-24-2006, 01:11 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Only to decrease them ... no sys-admin in their right mind will allow an
ordinary user to hog CPU. If you set your mind to it you could probably
come up with a cunning sudoers entry, but I wouldn't recommend it. In the
end you'll have two users both trying to get -19 and the machine won't be
very snappy for anyone.


Cheers,
Tink
 
Old 07-24-2006, 01:16 AM   #5
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well, accurate sudoers entry allows to set, say only 20 through -7. And maybe the situation discussed is on the box with no simultaneous logins.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set IRQ 4(Serial Modem) as top priority in Linux? Balarabay1 Programming 0 05-03-2006 08:45 AM
How to view set-user-ID and set-group-ID Xris718 Linux - General 7 01-10-2004 01:44 PM
window Nt assigns priority internally or by user?Which type of scheduling algorithm u seema General 0 09-26-2003 01:10 AM
Proftpd user priority hulf_slo Linux - Software 0 08-02-2003 04:47 PM
how do i set processor priority? Chooco Linux - General 2 06-11-2002 10:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration