Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm really running into a wall trying to figure this out. I have a Bash script and narrowed down the one command that doesn't seem to work via cron and it's my pgp decrypting line. Works fine if I run the command via terminal but if I run it via cron it doesn't output anything.
crontab -e shows the cronjob and it runs, creates the log file with no output. Is there maybe something I need to run as well? Permissions look set, unless the cron is running as a different user(I was under the assumption if it showed up under crontab while logged into that user, then it would run as that user.
If you run a script from cron make sure the script doesn't use any environment variables. Those variables are present when you are logged in as user X, but are not present when running from cron.
You might want to post the part you think isn't working so we can have a look.
Like I said, the job works as the log.txt is created. But it's blank. However, when I run it in terminal the file gets created but the output is there.
BTW: This isn't too smart: It shows your passphrase, which can be read by root and thus give root the possibility to read your encrypted stuff (which root cannot without the passphrase).
BTW: This isn't too smart: It shows your passphrase, which can be read by root and thus give root the possibility to read your encrypted stuff (which root cannot without the passphrase).
Anyway, hope this helps.
Would you recommend a better way? I tried probably for 3 days trying to read text output to determine when to send a password response, nothing ever worked. This was the only way for the password to be sent that worked for me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.