LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-09-2010, 09:29 AM   #1
rohit724
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
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 !!

Last edited by GrapefruiTgirl; 12-09-2010 at 09:42 AM. Reason: FIXED TITLE, because "Help ME!" is a terrible title for a thread.
 
Old 12-09-2010, 10:01 AM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,823

Rep: Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636Reputation: 2636
Quote:
Originally Posted by rohit724 View Post
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.
 
1 members found this post helpful.
Old 12-09-2010, 10:25 AM   #3
rohit724
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Yaa Its Working

Thanks A Lot
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 01:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration