by removing /tmp/gpg* everything works as expected, i.e. gpg myfile.gpg asks for password.
I also tested it with pinentry eselected to gtk and curse, and behaviour was reproduced in both cases:
when /tmp/gpg* are left in place, gpg does not ask for a password (either with pinentry set to gtk, or ncurse);
when /tmp/gpg* are rmoved, gpg asks a password (either case, gtk, ncurse)
Noticed this (I'm trying as root, now, but for user is similar):
Code: Select all
ps aux |grp gpg
/usr/bin/gpg-agent --sh --daemon --enable-ssh-support --write-env-file /root/.cache/gpg-agent-info
I'd like to start gpg-agent with one more option: --default-cache-ttl N
Code: Select all
# gpg-agent -h
gpg-agent (GnuPG) 2.0.22
libgcrypt 1.5.3
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Syntax: gpg-agent [options] [command [args]]
Secret key management for GnuPG
Options:
--daemon run in daemon mode (background)
--server run in server mode (foreground)
-v, --verbose verbose
-q, --quiet be somewhat more quiet
-s, --sh sh-style command output
-c, --csh csh-style command output
--options FILE read options from FILE
--no-detach do not detach from the console
--no-grab do not grab keyboard and mouse
--log-file use a log file for the server
--use-standard-socket use a standard location for the socket
--pinentry-program PGM use PGM as the PIN-Entry program
--scdaemon-program PGM use PGM as the SCdaemon program
--disable-scdaemon do not use the SCdaemon
--keep-tty ignore requests to change the TTY
--keep-display ignore requests to change the X display
--default-cache-ttl N expire cached PINs after N seconds
--ignore-cache-for-signing do not use the PIN cache when signing
--no-allow-mark-trusted disallow clients to mark keys as "trusted"
--allow-preset-passphrase allow presetting passphrase
--enable-ssh-support enable ssh support
--write-env-file FILE write environment settings also to FILE
But cannot find out how to configure it for startup. Basically I can't find how gpg-agent is started, at what point, what launched it and where to add the desired option.
does not give any gpg/gnupg result.
I'm marked this as solved, though, not to create anxiety about non-existent security issues.
The free men's path is always obstructed by mediocrity.