LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-24-2009, 03:29 AM   #1
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 218

Rep: Reputation: 32
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.
 
Old 07-24-2009, 03:35 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
I don't imagine that would be a good idea.
Changing process priority would be an administration task right - so ask the administrator.
 
Old 07-24-2009, 03:40 AM   #3
arckane
Member
 
Registered: Sep 2005
Location: UK
Distribution: Gentoo/Debian/Ubuntu
Posts: 307

Rep: Reputation: 38
You could always add nice to sudo for all users with no password... Just an option.
 
Old 07-24-2009, 03:42 AM   #4
webquinty
Member
 
Registered: Apr 2008
Location: Espaņa
Distribution: Suse
Posts: 218

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by Simon Bridge View Post
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
 
Old 07-24-2009, 07:26 AM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I enforce in Red hat linux that only root user be a member of the "root" group sultf Linux - Security 4 01-08-2009 05:42 PM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 11:18 PM
Where to find a "nice" Howto" for modem setup and use for IPS usage xerxesii Linux - Hardware 2 03-27-2007 01:21 AM
Postgresql error FATAL: user "root" does not exist" cgetty Ubuntu 4 06-21-2005 03:11 PM
giving access to use "nice" under non-root renegadeavenger Fedora 1 05-18-2005 11:18 AM


All times are GMT -5. The time now is 03:19 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration