1847165 Members
6348 Online
110263 Solutions
New Discussion

Re: Help with sudo

 
SOLVED
Go to solution
trpjr1
Advisor

Help with sudo

I'm having a problem getting sudo to run for an ov user. sudo version is 1.6.8p12 and OS is HPUX 11.23. I want the user opc_op to be able to run OV commands on the opt/OV/bin dir but when I run

sudo /opt/OV/bin/ovcert -list

I get the following error:

opc_op is not in the sudoers file. This incident will be reported.

Here is the contents on my /etc/sudoers file:
User_Alias OVADM = opc_op

Cmnd_Alias OVCMD = /opt/OV/bin/ovcert

OVADM misdwdb1 = NOPASSWD: OVCMD

any ideas?


3 REPLIES 3
Patrick Wallek
Honored Contributor
Solution

Re: Help with sudo

Where did you get the version of sudo that you installed? Are you ABSOLUTELY POSITIVE that /etc/sudoers is the right location for the file?

It is entirely possible that /etc is the wrong spot. I have sudoers files in different locations on my various servers. The location depends entirely on how sudo was compiled.

Locations of sudoers that I have:

/etc
/usr/local/etc
/opt/iexpress/sudo/etc

Check those locations.

How did you edit the sudoers? Did you just vi the file? If so, that may be part of the problem. You really need to use 'visudo' to edit the file. That way when you exit it checks the file and reports any errors to you and gives you the opportunity to fix them.
Steven E. Protter
Exalted Contributor

Re: Help with sudo

Shalom,

The http://software.hp.com Internet Express ix version of sudo has its configuration files in /opt

Also I don't see the user opc_op in the configuration.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
trpjr1
Advisor

Re: Help with sudo

Thank you very much. I had the sudoers file in /etc and it needed to be in /usr/local/etc.

Thanks again
Tommy