LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-08-2012, 11:59 AM   #1
techshell81
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Rep: Reputation: Disabled
How to run shell script with sudo user from external scheduler


Hi,

We have using version linux 5 operating system.

my oracle installed under "admin" user.

we have to monitor my oracle database is available or not from my application server.

for this we prepared the shell script and put oracle sql command inside the shell script.
this shell script we have to run from external scheduler.

i am runing shell script from external scheduler with my login but i am not able to use oracle(is installed under admin)


Please any one tell me how to run to shell script sql command with sudo user from external scheduler.

Thanks
 
Old 11-08-2012, 12:08 PM   #2
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,825

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
with sudo user
User has to have permissions in the sudoers file to be able to run as root.
http://linux.die.net/man/8/sudo
http://linux.die.net/man/5/sudoers

Code:
## User privilege specification
##
root ALL=(ALL) ALL

## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
# %sudo	ALL=(ALL) ALL
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run shell script and ignore user abort ? deriklogov1983 Linux - Server 2 08-07-2012 09:31 PM
[SOLVED] sudo for www user to run root shell script via browser kzcom Linux - General 11 09-15-2010 02:48 AM
how to run a shell script with super user privs when my network get disconnected!!! sd|| Linux - Newbie 1 12-02-2009 06:14 AM
Shell Script - Change user & run multiple commands ijf99 Linux - Newbie 1 01-26-2009 07:15 AM
allow sudo for www user to run root shell script cccc *BSD 12 07-23-2005 04:48 PM


All times are GMT -5. The time now is 12:43 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration