LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 10: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, 11:08 AM   #2
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
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



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 08:31 PM
[SOLVED] sudo for www user to run root shell script via browser kzcom Linux - General 11 09-15-2010 01:48 AM
how to run a shell script with super user privs when my network get disconnected!!! sd|| Linux - Newbie 1 12-02-2009 05:14 AM
Shell Script - Change user & run multiple commands ijf99 Linux - Newbie 1 01-26-2009 06:15 AM
allow sudo for www user to run root shell script cccc *BSD 12 07-23-2005 03:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:49 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
Open Source Consulting | Domain Registration