Showing results for 
Search instead for 
Did you mean: 

settinf sudo commands ??

Go to solution
Super Advisor

settinf sudo commands ??

I've had a request from our DBA's to setup about 12 different Oracle commands in sudo so they can run them from the oracle Admin account....

All of these commands are in the same directory: /opt/oracle/crs/bin and the commands are: ocrconfig, ocrconfig.bin, crsctl, crsctl.bin, ocrdump, ocrdump.bin, crsd, crsd.bin, oifcfg, and oifcfg.bin

Is there a way to set these up as one Cmnd_Alias instead of having 10 different ones for each command ??
Ivan Ferreira
Honored Contributor

Re: settinf sudo commands ??

If you specify the directory itself, all this commands can be executed with sudo, for example:

Cmnd_Alias ORACLE_BIN=/opt/oracle/crs/bin/

The last slash is important.

You can also specify just one Cmnd_Alias listing the commands separated by "," for example:

Cmnd_Alias ORACLE_BIN=/opt/oracle/crs/bin/crsctl,/opt/oracle/crs/bin/ocrconfig
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Super Advisor

Re: settinf sudo commands ??