LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   visudo? I need to provide sudo access to Oracle User (https://www.linuxquestions.org/questions/linux-newbie-8/visudo-i-need-to-provide-sudo-access-to-oracle-user-849292/)

rohit724 12-09-2010 09:29 AM

visudo? I need to provide sudo access to Oracle User
 
Hi All,

I am new Linux .. Please someone help me ..



I need to provide sudo access to Oracle User, run only this particular "SRVCTL" command.

Do I need to edit "sudoers" file .if so where do I need to add these two lines in sudoers file.

1. apps/opt/grid/bin/srvctl
2. /apps/opt/oracle/product/11.2.0/db_1/bin/srvctl

Sorry if I am confusing, someone please help me

Thanks A Lot !!

TB0ne 12-09-2010 10:01 AM

Quote:

Originally Posted by rohit724 (Post 4185985)
Hi All,

I am new Linux .. Please someone help me. I need to provide sudo access to Oracle User, run only this particular "SRVCTL" command.

Do I need to edit "sudoers" file .if so where do I need to add these two lines in sudoers file.

1. apps/opt/grid/bin/srvctl
2. /apps/opt/oracle/product/11.2.0/db_1/bin/srvctl

Sorry if I am confusing, someone please help me

Well, if you want to modify how SUDO behaves, you obviously have to modify the sudoer's file.

First, you need to be root to run "visudo". Do NOT just edit the sudoers file manually...while you CAN do it, the permissions and other things you have to set on the file afterwards can be tricky, and render sudo unusable if you get it wrong. Visudo is much easier.

Add a line similar to this:
Code:

oracle ALL= /apps/opt/grid/bin/srvctl, /apps/opt/oracle/product/11.2.0/db_1/bin/srvctl
So those commands are the ONLY thing the oracle user can run as root. They would run it with "sudo /apps/opt/grid/bin/srvctl". There are many man pages and examples you can find on Google.

rohit724 12-09-2010 10:25 AM

Yaa Its Working

Thanks A Lot


All times are GMT -5. The time now is 04:24 AM.