Operating System - HP-UX
1843944 Members
2495 Online
110226 Solutions
New Discussion

Re: using sudo for enabling users specific commands

 
SOLVED
Go to solution
itai weisman
Super Advisor

using sudo for enabling users specific commands

hi all,
I need to give common users the ability some OV command, I used the VISUDO command in order to edit the SUDOERS file, I added the requested commands, but still, those users couldn't run the commands (I recievd an "cannot execute" error)
anyone?
Itai.
7 REPLIES 7
Michael Tully
Honored Contributor

Re: using sudo for enabling users specific commands

Please provide a copy of what you have in the sudoers file and what commands you want and we will see if we can help.
Anyone for a Mutiny ?
itai weisman
Super Advisor

Re: using sudo for enabling users specific commands

for example -
user1 server_a=/opt/OV/bin/OpC/opcservice
Geoff Wild
Honored Contributor

Re: using sudo for enabling users specific commands

How did you install sudo?

Did you get it from here:
http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1111

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Bharat Katkar
Honored Contributor

Re: using sudo for enabling users specific commands

For your reference:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=630557

Regards,
You need to know a lot to actually know how little you know
Jeff Schussele
Honored Contributor

Re: using sudo for enabling users specific commands

Hi Itai,

You need to setup these things in three places in the sudoers file:

1) User_Alias = %group_name
2) Cmd_Alias = /path/to/command1, /path/to/command2, etc....
3) USER_ALIAS = ALL (root) CMD_ALIAS

Sounds like you don't have all three in place.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
itai weisman
Super Advisor

Re: using sudo for enabling users specific commands

what should i put in those vars?
i never used them before....
Sridhar Bhaskarla
Honored Contributor
Solution

Re: using sudo for enabling users specific commands

Hi Itai,

Are you sure they are running the command with 'sudo'? like

/usr/local/bin/sudo opt/OV/bin/OpC/opcservice

This will ask for their password. If you don't want it to ask the password, then you will need to put

user1 server_a= (root) NOPASSWD: /opt/OV/bin/OpC/opcservice

-Sri
You may be disappointed if you fail, but you are doomed if you don't try