LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 12-29-2009, 06:01 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 497

Rep: Reputation: 30
Run a script without password !


I want to run a oracle rman script using another user (Like user "common") . Now I need to add a line

"su - oracle" in above the script . Since , the script dont run as root user so when I run the script , then during execution of "su - oracle" command , It prompt for password .But I dont want to specify the oracle user's password .

The script will be like following :


code :
su - oracle // "here I dont mention password"
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export ORACLE_SID=support
$ORACLE_HOME/bin/rman target sys/sys123 << !

run
{
allocate channel t1 device type disk format '/dbfs/rmanback/ababil_%s_%T';
sql "alter system switch logfile";
backup incremental level 0 database;
backup archivelog all delete all input;


Would anybody plz help me regarding this issue ?

Last edited by shipon_97; 12-29-2009 at 06:05 AM.
 
Old 12-29-2009, 07:53 AM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,194

Rep: Reputation: 105Reputation: 105
Just an idea, but how about setting that up with sudo? Configure sudoers to allow that one user to su to oracle.
 
  


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
Creating a script that will log into root and enter password and then run commands. tananthulus Linux - Newbie 8 11-02-2009 06:37 PM
run script on invalid password slimm609 Linux - Security 1 12-14-2008 02:27 PM
MySQL Updates With Null When Perl Script Run From Shell Script ThisGuyIKnow Programming 6 08-12-2008 10:56 AM
Is a script, run at boot time from init.d, run with root authority? tmbrwolf53 Linux - Server 2 03-31-2007 09:15 PM
on Network Up Script run? On Battery power run script? v2-ncl Linux - General 0 12-08-2003 10:34 AM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 12:02 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