Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make gpg prompt for passphrase on CLI

The encryption tool of gnuPG package gpg prompts for passphrase using a GUI dialog box when invoked by a regular user, however when invoked by root it prompts on CLI. How to make it use the CLI even when invoked by a regular user. version:GnuPG 1.4.12

like image 463
Mayank Pundir Avatar asked Jul 21 '13 06:07

Mayank Pundir


People also ask

How do I get my gpg passphrase?

For me the simplistic way to check the passphrase is to use gpg --passwd shorthand. It tries to change the passphrase and the step is to confirm the old passphrase, and then you can click 'cancel' on the new passphrase prompt and this keeps the passphrase intact.

Why does gpg not ask for passphrase?

gpg caches the passphrase used for symmetric encryption so that a decrypt operation may not require that the user needs to enter the passphrase.

What is passphrase gpg?

The gpg-preset-passphrase is a utility to seed the internal cache of a running gpg-agent with passphrases. It is mainly useful for unattended machines, where the usual pinentry tool may not be used and the passphrases for the to be used keys are given at machine startup. This program works with GnuPG 2 and later.


1 Answers

On a debian box:

sudo apt install pinentry-tty sudo update-alternatives --config pinentry 

(and set it to pinentry-tty)

like image 162
John Lawrence Aspden Avatar answered Sep 29 '22 07:09

John Lawrence Aspden