Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 08-04-2010, 07:24 PM   #1
LQ Newbie
Registered: Oct 2008
Posts: 11

Rep: Reputation: 1
gpg --passphrase goes interactive with v1.1.8-4.fc13

I need an non-interactive, symetric, passphrase mechanism that can be used on machines beyond my sys-admin control.
Currently, I use the Python code (with variants):
Stat, Output = commands.getstatusoutput(
"gpg -c --passphrase=%s '%s'"%(Password, TarFileName))
to encrypt and decrypt files (tar balls). The "Password" is generated by a Python code on a singular removable flash drive. It worked with FC11 and Windows, but with FC13 I get an interactive dialog, which gets canceled, and then:
can't connect to `/home/{a user id}/.gnupg/S.gpg-agent': No such file or directory
gpg-agent[3432]: command get_passphrase failed: Operation cancelled
gpg: cancelled by user
gpg: error creating passphrase: Operation cancelled
gpg: symmetric encryption of `testdata' failed: Operation cancelled
The operator does not know the pass phrase. This is a single user mechanism which relies upon the mounting of the special flash drive to work. The application is portable across many platforms and hosts, but can only be used by the possessor of the flash drive.
Old 08-06-2010, 06:53 AM   #2
Senior Member
Registered: Jul 2007
Distribution: Ubuntu 10.10, Slackware 64-current
Posts: 2,124

Rep: Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778Reputation: 778
can't connect to `/home/{a user id}/.gnupg/S.gpg-agent': No such file or directory
It looks like somewhere in your upgrade process that GPG got reconfigured to use the default keyring, which will be under the home directory of the active user. As you wish to keep the keys on a USB stick, this won't be the case. You either need to edit gpg.conf to tell it to use the USB mounted keyring or in your script set the environment variable telling the system where to find the keyring.


gpg, noninteractive, passphrase

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
How is the passphrase exactly used when dealing with GPG keys? abefroman Linux - Security 3 10-15-2009 01:30 AM
GPG with out passphrase option for decryption vjayraghavan Linux - Newbie 1 07-01-2009 10:12 AM
Cracking a gpg pgp key (passphrase) DaRkBoDoM Linux - Security 1 11-20-2007 04:32 AM
Revoking GPG key with only passphrase and public key djib Linux - Security 2 03-13-2007 04:20 AM
KMail and PGP/GPG not working - doesn't ask for passphrase steve1401 Linux - General 2 02-08-2005 07:42 AM

All times are GMT -5. The time now is 10:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration