LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 10-04-2011, 06:32 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Rep: Reputation: 30
Cannot run the encrypted script !


Dear Friends ,

I created a script which take the Oracle rman backup . I created it like below :


>[oracle@server ~]$ cat rman
>Date=`date +%d%b%Y`.`date +%I`.`date +%M%p`
>$ORACLE_HOME/bin/rman target sys/sys123 >log=/home/oracle/rman_fullbackup_$Date.log << !
>run
>{
>backup database;
>backup archivelog all;
>delete noprompt archivelog until time 'sysdate -1';
>}


Now I need to encrypt it and do it using "vi -x rman".
but when I run the script then I got the below error :

>[oracle@server ~]$ sh rman
>rman: rman: cannot execute binary file

Now would anybody plz give any solution that how can I run the above encrypted script .

Thx in advance ... ...
 
Old 10-04-2011, 06:35 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
it's not an executable script if you encrypted it with gpg. I guess you can decrypt it and then pipe it into sh, but what are you expecting to achieve by doing all of this?
 
Old 10-04-2011, 06:47 AM   #3
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Original Poster
Rep: Reputation: 30
Thx for reply ...

Actually I want to run the above script in encrypted format .Is there any other solution that I can run the script in encrypted formet ? so that , none can read the script .

Last edited by shipon_97; 10-04-2011 at 06:49 AM.
 
Old 10-04-2011, 06:56 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
how do you intend to make it run if it's encrypted? it needs to be encrypted at some stage, seems largely pointless to me. again, why do you want to do this? What is the perceived problem you want to solve?
 
Old 10-04-2011, 07:41 AM   #5
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Original Poster
Rep: Reputation: 30
Ok boss ...

I just want to hide the SYS user password . If I can encrypt just one line or password only (sys123) , that's can be a solution for me ... any idea plz ?
 
Old 10-04-2011, 07:52 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well you can't just randomly encrypt something with an arbitrary ecryption method you found somewhere and have it just work.

http://download.oracle.com/docs/cd/B...ctg.htm#444966 5 seconds on google says this might be useful. generally the approach is to guard an unencrypted file with appropriate user ownership and permissions.
 
  


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
My BASH script work perfect when i run it manualy, but not when it run in the crontab roqarg Linux - Newbie 30 05-06-2010 02:37 PM
Now to send encrypted mails with a script or mail command robertjinx Linux - Server 4 03-06-2009 02:08 PM
How to run encrypted files in perl 5.10.0 viveksnv Programming 1 06-11-2008 08:47 PM
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


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