LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Use "nice" as other user than root... (https://www.linuxquestions.org/questions/linux-newbie-8/use-nice-as-other-user-than-root-742410/)

webquinty 07-24-2009 02:29 AM

Use "nice" as other user than root...
 
Hello,

I tried to change priority of process with "nice" command, but function return me a error because only root can make it. The same problem if I try to do it by code:
Code:

        memset(&schedp, 0, sizeof(schedp));
        schedp.sched_priority = par->prio;
        sched_setscheduler(0, SCHED_FIFO, &schedp);

is there a way to change priority of process or thread with user different than root???

Best regards.

Simon Bridge 07-24-2009 02:35 AM

I don't imagine that would be a good idea.
Changing process priority would be an administration task right - so ask the administrator.

arckane 07-24-2009 02:40 AM

You could always add nice to sudo for all users with no password... Just an option.

webquinty 07-24-2009 02:42 AM

Quote:

Originally Posted by Simon Bridge (Post 3618553)
I don't imagine that would be a good idea.
Changing process priority would be an administration task right - so ask the administrator.

Hello Simon,

you are right, it is not a good idea.
This doubt is only to make a test, and I am administrator of machine, so do not worried about it.

Then, is it possible??

Best regards

Simon Bridge 07-24-2009 06:26 AM

Then you are talking about privilege escalation, a whole different ball game.
How easy it is depends on how your system is set up. What is your concern?

@arkane: for goodness sake tone down your sig. Nobody will thank you when you're yelling in their faces.


All times are GMT -5. The time now is 12:59 PM.