Operating System - HP-UX
1834041 Members
2347 Online
110063 Solutions
New Discussion

Changing a users nice privileges

 
Alan Edwards
Frequent Advisor

Changing a users nice privileges

Does anyone know how to allow a user to reduce the nice value of a command he wants to run?
The user accounts come from NIS.
Klatu Barada Nikto
8 REPLIES 8
Ken Hubnik_2
Honored Contributor

Re: Changing a users nice privileges

Do a man on renice
Alan Edwards
Frequent Advisor

Re: Changing a users nice privileges

I did, it just mentioned privileges, but not how to change them.
Klatu Barada Nikto
Christopher Caldwell
Honored Contributor

Re: Changing a users nice privileges

nice - run a new process at the given priority
renice - change the priority of a process that's already running

From man renice
-To reduce the system nice value of a process, or to set it to a value less than 20 (with a negative newoffset), a user must have appropriate privileges.

man privgrp

see
RTPRIO -

Alan Edwards
Frequent Advisor

Re: Changing a users nice privileges

Hi Chris,

Yes, but how do you give the appropriate privileges?

Alan
Klatu Barada Nikto
Ken Hubnik_2
Honored Contributor

Re: Changing a users nice privileges

Do a man on nice. There is a priority_change option that gives priveledges to other users.
Darrell Allen
Honored Contributor

Re: Changing a users nice privileges

The only way I know is that the user be superuser or be given superuser privileges thru sudo or restricted SAM.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Jeff Schussele
Honored Contributor

Re: Changing a users nice privileges

Hi,

The only way a user can increase priority fo their process is:

1) sudo (preferred)
2) SUID on the nice (at eceution) or renice (afterwards) command (riskier)

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Christopher Caldwell
Honored Contributor

Re: Changing a users nice privileges

set
man 1m setprivgrp

essentially, you place someone in a group, then you delegate privilege to that group:

e.g.
/etc/group

fred:fredsgrp

#ll /etc/privgroup
#setprivgrp fredsgrp RTPRIO