LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 03-18-2008, 03:54 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Rep: Reputation: 31
Rman Script with ORacle10g in RHEL5


Dear Friends ,
I have to install ORacle10g in RHEL5 . Now I need to take rman backup
and for this reason I make the following script :

============================
rman target / << !
run
{
allocate channel t1 type disk;
backup format 'df_%t_%s_%p'
(database);}
==============================

It works fine and does not prompt for any user name and password . But Now
I want a situation where this script wants username and password prompt
when it goes to run , i.e., I need username and password prompt during
running this script ?

Can anybdy plz help me .. ...
 
Old 03-20-2008, 06:51 AM   #2
Sm1ler
Member
 
Registered: Apr 2004
Location: UK
Distribution: Fedora Core (all), Knoppix, RHEL, Centos, Debian
Posts: 100

Rep: Reputation: 16
Off the top of my head I can't think of a way of doing this but you could get the script to check what users is running it and error if it detects the wrong user - thus prompting them to su to the correct user before re-running the script. - You will of course need to lock editing rights of the script down to the one user.

something like

if [[ `whoami` != "username" ]];
then
echo "Notice you are not "username" please su (Switch user) to username and re-run the script"
exit 1
else
## the rest of your script ##
fi
 
  


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
What is http-rman in /etc/hosts.deny on suse? MalcolmV8 SUSE / openSUSE 5 01-05-2010 05:09 AM
automatic start oracle10g script velmots83 Linux - Software 1 04-15-2008 12:11 AM
script issues from suse to RHEL5 AS pingpong Linux - Enterprise 1 02-14-2008 06:17 AM
RMAN Command fa_khan50 Linux - Newbie 3 12-18-2007 07:03 AM
oracle10g on slack10? zord Slackware 6 05-20-2005 08:51 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

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