GPG using sudo under another user, is `pinentry-mode loopback` safe?
2
votes
0
answers
421
views
There are 2 users: user1 and user2. When trying to use gpg via sudo *(symmetric decryption)*:
user1@host: sudo -u user2 gpg /home/user2/pass.gpg
an error
gpg: decryption failed: No secret key
.
I set it to --pinentry-mode loopback
and the password request happens (right in the terminal), I type and the decryption happens. Tell me, is this approach safe?
I can't understand how this option works. The GnuPG website says:
> Redirect Pinentry queries to the caller. This enables the use of
> gpgme_set_passphrase_cb because pinentry queries are redirected to
> gpgme.
Asked by NewLinux
(157 rep)
Jan 22, 2022, 03:50 PM
Last activity: Jan 22, 2022, 05:54 PM
Last activity: Jan 22, 2022, 05:54 PM