04-15-2012
Quote:
Originally Posted by
mr_harish80
In this case I am storing the password in the file which can read by any other person.
That's what file permissions are for, and why I told you what file permissions were necessary.
Quote:
If there is any other mechnism to enrypt that pasword and use this in the script
This is a common fallacy. No. If the script can decrypt it, so can anyone else, by reading the script. Keeping the script properly secured is no better than keeping the file properly secured, which you could have done in the first place.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have 2 systems that cannot telnet directly into our UNIX system via IP. The only thing that separate these 2 systems from all the others in our office is that they run a PGP encryption within Outlook. I can telnet to a different server and then telnet from there to the one I want to get to, but... (7 Replies)
Discussion started by: jgordon
7 Replies
2. Shell Programming and Scripting
This may be more of a PGP (Pretty Good Privacy) question than Unix, but here's hoping.
The statement I'm using to compress a file is:
/opt/pgp-6.5.8/pgp +force -feat MY_Pub_Key < file_in.txt > file_out.asc
The +force parameter is documented as "Eliminating confirmation questions", but I... (1 Reply)
Discussion started by: abNORMal
1 Replies
3. Solaris
Hi
Someone is going to send me a file that they have encrypted by PGP encryption on windows pc to my solaris 9 server.
They will give me the pgp key to decrypt the file.
How can I do this on solaris 9
Is there a tool installed by default to decrypt or do I need to install something to... (0 Replies)
Discussion started by: frustrated1
0 Replies
4. UNIX for Advanced & Expert Users
Hi
I have one script for doing the gpg encryption on linux.
The encrytion is doing fine when i am running the script from command prompt on linux
The same script when it is triggering from mainframe using sysopts option in NDM(connect direct) the encryption step in the shell script is... (0 Replies)
Discussion started by: Arvind Maurya
0 Replies
5. Cybersecurity
Hi All,
I am new to the concept of encryption and shell and i have been assigned to do pgp encryption of a file before ftping it.
I am developing the script using MKS Toolkit on Windows XP and the script will run later on actual unix box.
I am going through documents provided by pgp... (2 Replies)
Discussion started by: sandeepb
2 Replies
6. UNIX for Dummies Questions & Answers
Hello,
Does anyone know if it's normal to have a very different file size after a file has been encrypted using pgp?
Before encryption: 582.7618598938 MB
After encryption: 98.73 MB
Thanks in advance for any help, (2 Replies)
Discussion started by: tekster757
2 Replies
7. Solaris
Hi,
i am trying to encrypt a file using pgp with a recepient's public key. The file is encrypted but the output file has owner & group nobody. i am not able to change it either. Please let me know how to do pgp encryption so that i get the output with owner and group as the same user which runs... (4 Replies)
Discussion started by: renjyverghese
4 Replies
8. UNIX for Advanced & Expert Users
Hi,
Could anyone please help me in understanding how PGP can be installed and configured in HP-UX machines.Is there any separate licence required ? and what are the minimum system requirements to have PGP installed on a server (1 Reply)
Discussion started by: tinivt
1 Replies
9. Shell Programming and Scripting
Hi,
I have an already running Production script that I need to simulate in QA. The script is trying to decrypt some files using the below command:
pgp --decrypt ${GET_DIR}/*.pgp --home-dir /.pgp
I am getting the following error:
1080:no private key could be found for decryption
Can... (3 Replies)
Discussion started by: Jigsaw16
3 Replies
10. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
PGP encryption works manually but not with crontab
2. Relevant commands, code, scripts, algorithms:
Below... (4 Replies)
Discussion started by: sharath.molagav
4 Replies
LEARN ABOUT CENTOS
shell-quote
SHELL-QUOTE(1) User Contributed Perl Documentation SHELL-QUOTE(1)
NAME
shell-quote - quote arguments for safe use, unmodified in a shell command
SYNOPSIS
shell-quote [switch]... arg...
DESCRIPTION
shell-quote lets you pass arbitrary strings through the shell so that they won't be changed by the shell. This lets you process commands
or files with embedded white space or shell globbing characters safely. Here are a few examples.
EXAMPLES
ssh preserving args
When running a remote command with ssh, ssh doesn't preserve the separate arguments it receives. It just joins them with spaces and
passes them to "$SHELL -c". This doesn't work as intended:
ssh host touch 'hi there' # fails
It creates 2 files, hi and there. Instead, do this:
cmd=`shell-quote touch 'hi there'`
ssh host "$cmd"
This gives you just 1 file, hi there.
process find output
It's not ordinarily possible to process an arbitrary list of files output by find with a shell script. Anything you put in $IFS to
split up the output could legitimately be in a file's name. Here's how you can do it using shell-quote:
eval set -- `find -type f -print0 | xargs -0 shell-quote --`
debug shell scripts
shell-quote is better than echo for debugging shell scripts.
debug() {
[ -z "$debug" ] || shell-quote "debug:" "$@"
}
With echo you can't tell the difference between "debug 'foo bar'" and "debug foo bar", but with shell-quote you can.
save a command for later
shell-quote can be used to build up a shell command to run later. Say you want the user to be able to give you switches for a command
you're going to run. If you don't want the switches to be re-evaluated by the shell (which is usually a good idea, else there are
things the user can't pass through), you can do something like this:
user_switches=
while [ $# != 0 ]
do
case x$1 in
x--pass-through)
[ $# -gt 1 ] || die "need an argument for $1"
user_switches="$user_switches "`shell-quote -- "$2"`
shift;;
# process other switches
esac
shift
done
# later
eval "shell-quote some-command $user_switches my args"
OPTIONS
--debug
Turn debugging on.
--help
Show the usage message and die.
--version
Show the version number and exit.
AVAILABILITY
The code is licensed under the GNU GPL. Check http://www.argon.org/~roderick/ or CPAN for updated versions.
AUTHOR
Roderick Schertler <roderick@argon.org>
perl v5.16.3 2010-06-11 SHELL-QUOTE(1)