confusing message: 'no pinentry'

Steve Revilak steve at srevilak.net
Tue Sep 2 15:59:22 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> From: Petr Uzel
> Date: Tue, 2 Sep 2008 14:37:57 +0200
> Subject: confusing message: 'no pinentry'

> Today I've tried to generate gpg key as root and got the following error:
>
> gpg: problem with the agent: No pinentry
> gpg: Key generation canceled.
>
> This seemed strange because I'm sure that I have pinentry (both -curses
> and -qt) properly installed.

Is there a pinentry in root's path?  For example, on my system, I have

  $ type pinentry
  pinentry is /opt/local/bin/pinentry


> Further investigation revealed that the problem only arises if I 'su' from my
> normal user account (running gpg-agent and thus with GPG_AGENT_INFO
> set). 'su' preserves GPG_AGENT_INFO variable and gpg then tries to connect to
> gpg-agent running under my normal account, and then gpg fails. When switched
> to root with 'su -', gpg works fine.

This sounds like normal behavior for su.  "su -" is supposed to
simulate a full login of the target account; it discards most
environment.  By contrast, "su" (without the minus) doesn't discard
the environment.

The su(1) manpage on your system should give more specific about how
"su - " is handled.

Steve
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.8 (Darwin)

iEYEARECAAYFAki9Rr4ACgkQX7YJI4BuyDQpLQCfYIQtq5hp6MmZ6cxZBEj6noj+
pVIAn06rbPeNRcHDdcipYqxHMWCnb2vj
=4Bym
-----END PGP SIGNATURE-----



More information about the Gnupg-users mailing list