PGP encryption issue with Crontab

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions PGP encryption issue with Crontab
# 1  
Old 11-03-2014
PGP encryption issue with Crontab

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 Command works fine manually
pgp --encrypt $file_path --recipient "publickey" -v --home-dir /$HOME/alice/.pgp/
But the same command when included in a test.sh and scheduled through crontab, it gives "pgp: not found" error



3. The attempts at a solution (include all code and scripts):

I assume that crontab kicks off with root user and the root user is unable to find the location of pgp installed in the user alice.
Specified --home-dir argument explicitly, even then it didn't work.

4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
WIP, IL, USA

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
# 2  
Old 11-03-2014
This problem is so common it's in our FAQ.

cron runs with a very minimal PATH. Try /absolute/path/to/php instead of just pgp.
# 3  
Old 11-03-2014
Thanks for the reply Corona688.
Tried it with absolute path /opt/pgp/bin/pgp, manually it works. But, with crontab it gives ld.so.1: pgp: fatal: relocation error: file /opt/pgp/lib/libstdc++.so.6: referenced symbol not found.
Further, I tried to set environment variable $LD_LIBRARY_PATH to include /opt/pgp/bin using below command:
set $LD_LIBRARY_PATH = /opt/pgp/lib:$LD_LIBRARY_PATH.
Still the LD_LIBRARY_PATH value remains the same (It's not updated)
Please suggest

Last edited by sharath.molagav; 11-03-2014 at 04:30 PM..
# 4  
Old 11-03-2014
Hmmm. Trickier, if it's installed in /opt. Do you have LD_LIBRARY_PATH set in your shell? What does ldd /opt/pgp/bin/pgp print?
# 5  
Old 11-03-2014
Quote:
Originally Posted by sharath.molagav
Thanks for the reply Corona688.
Tried it with absolute path /opt/pgp/bin/pgp, manually it works. But, with crontab it gives ld.so.1: pgp: fatal: relocation error: file /opt/pgp/lib/libstdc++.so.6: referenced symbol not found.
Further, I tried to set environment variable $LD_LIBRARY_PATH to include /opt/pgp/bin using below command:
set $LD_LIBRARY_PATH = /opt/pgp/lib:$LD_LIBRARY_PATH.
Still the LD_LIBRARY_PATH value remains the same (It's not updated)
Please suggest
What shell are you running under?

csh uses "setenv VAR value" (note the lack of an "="...), bash/sh uses "VAR=value; export VAR".

I have no idea what "set $LD_LIBRARY_PATH=..." does.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Cybersecurity

File encryption tools with MAC address as an encryption key

Hi all, I'm looking for secure file encryption tools that use MAC address as encryption key. FYI, I'm using Red Hat Enterprise Linux OS. For example: when A wants to send file to B A will encrypt the file with B's computer MAC/IP address as an encryption key This file can only be decrypted... (2 Replies)
Discussion started by: sergionicosta
2 Replies

2. UNIX for Advanced & Expert Users

Setting up PGP encryption in HPUX

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

3. Linux

Pgp encryption script

I have file in linux which I need to do the PGP encryption. Through manually I am using this command to do the same gpg -c scsrun.log Enter passphrase : Repeat Passphrase : But how I can achive this using linux script. Thanks How to use code tags (3 Replies)
Discussion started by: mr_harish80
3 Replies

4. Solaris

PGP encryption

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

5. UNIX for Dummies Questions & Answers

File size after pgp encryption

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

6. Cybersecurity

How to use PGP File Encryption

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

7. UNIX for Advanced & Expert Users

pgp encryption

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

8. Solaris

PGP encryption/decryption solaris 9

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

9. UNIX for Advanced & Expert Users

Telnet Blocked - PGP Encryption?

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
Login or Register to Ask a Question