Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

An employee will be leaving our company, and we have a directory tree containing a number of files, each holding a password for a specific service, and each file is encrypted to those who require it.

I'd like to try and list all the files which include a particular recipient, however I can't seem to find a way to ask gpg to list the keys for an encrypted file. The only way I know currently how to list the keys is to attempt a decryption of a file, but this would be useless for a search as it would require my passphrase about a billion times.

share|improve this question

1 Answer 1

It's been a while since I used GPG, but the --list-packets option might be of some use; otherwise, I'd suggest the following (assuming you can mount the remote directory on your local machine):

  1. Backup your local secret keyring
  2. Remove the passphrase from your secret key
  3. Mount the remote directory on your local machine
  4. Enumerate the locally mounted copy of your remote directory
  5. Reset the passphrase on (or restore the backup of) your secret keyring

Alternately, create a special copy of your secret keyring that you remove the passphrase from, and use --secret-keyring to specify it during the traversal.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.