dyne / tomb

the Crypto Undertaker
https://dyne.org/software/tomb
GNU General Public License v3.0
1.35k stars 153 forks source link

Unable to type any passwords due to lack of prompt from pinentry #404

Closed Roxxers closed 3 years ago

Roxxers commented 3 years ago

I am unable to enter any password where one is required (open, forge, etc.) as I am not given the password prompt and the script continues without one, causing an error of not entering a password.

OS: Nixos Unstable Version: Running the script from the git repo master branch due to the current one in the nix store for me being the broken 2.8.0 typo version. tomb -v ouput

  Tomb 2.8.1 - a strong and gentle undertaker for your secrets

   Copyright (C) 2007-2020 Dyne.org Foundation, License GNU GPL v3+
   This is free software: you are free to change and redistribute it
   For the latest sourcecode go to <http://dyne.org/software/tomb>

   This source code is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
   When in need please refer to <http://dyne.org/support>.

  System utils:

  Sudo version 1.9.4
  cryptsetup 2.3.4
  pinentry-curses (pinentry) 1.1.0
  findmnt from util-linux 2.36
  gpg (GnuPG) 2.2.24 - key forging algorithms (GnuPG symmetric ciphers):
  IDEA 3DES CAST5 BLOWFISH AES AES192 AES256 TWOFISH CAMELLIA128 CAMELLIA192 CAMELLIA256

  Optional utils:

  gettext not found
  dcfldd not found
  /run/current-system/sw/bin/shred
  steghide not found
  /run/current-system/sw/bin/resize2fs
  tomb-kdb-pbkdf2 not found
  /run/current-system/sw/bin/qrencode
  swish-e not found
  unoconv not found
  lsof not found

tomb command output

tomb  .  Commanded to open tomb /home/roxie/tombs/xxxxx.tomb
tomb  .  An active swap partition is detected...
tomb (*) The undertaker found that all swap partitions are encrypted. Good.
tomb  .  Valid tomb file found: /home/roxie/tombs/xxxxx.tomb
tomb  .  Key is valid.
tomb  .  Mountpoint not specified, using default: /run/media/roxie/xxxxx
tomb (*) Opening xxxxx on /run/media/roxie/xxxxx
tomb  .  This tomb is a valid LUKS encrypted device.
tomb  .  Cipher is "aes" mode "xts-plain64" hash "sha512"
tomb  .  A password is required to use key /home/roxie/tombs/xxxxx.tomb.key
tomb [W] Empty password
tomb [W] User aborted password dialog.
tomb [E] No valid password supplied.

No password prompt appears on screen or as a gui popup during the command.

jaromil commented 3 years ago

Thanks for reporting, I'm waiting for a 2.8.2 release just to see if we've ironed out all issues (...and to get past 2020).

Can you please paste the log produced using the -D debug flag in tomb? Also can you please report the Zsh version you have installed?

Roxxers commented 3 years ago

Can you please paste the log produced using the -D debug flag in tomb? Also can you please report the Zsh version you have installed?

Debug output

tomb [D] Identified caller: roxie (1000:100)
tomb [D] Tomb command: open /home/roxie/tombs/xxxxx.tomb
tomb [D] Caller: uid[1000], gid[100], tty[/dev/pts/1].
tomb [D] Temporary directory: /tmp/zsh
tomb  .  Commanded to open tomb /home/roxie/tombs/xxxxx.tomb
tomb  .  An active swap partition is detected...
tomb (*) The undertaker found that all swap partitions are encrypted. Good.
tomb [D] is_valid_tomb /home/roxie/tombs/xxxxx.tomb
tomb [D] tomb file is readable
tomb [D] tomb file is a regular file
tomb [D] tomb file is not empty
tomb [D] Mapper: tomb.xxxxx.c555ba97158015af54297f7e082492654e87c06c2dbb0e862cadf5e4ed62c401.loop0
tomb [D] tomb file is not currently in use
tomb  .  Valid tomb file found: /home/roxie/tombs/xxxxx.tomb
tomb [D] load_key argument: /home/roxie/tombs/xxxxx.tomb.key
tomb [D] load_key: /home/roxie/tombs/xxxxx.tomb.key
tomb [D] is_valid_key
tomb  .  Key is valid.
tomb  .  Mountpoint not specified, using default: /run/media/roxie/xxxxx
tomb (*) Opening xxxxx on /run/media/roxie/xxxxx
tomb  .  This tomb is a valid LUKS encrypted device.
tomb  .  Cipher is "aes" mode "xts-plain64" hash "sha512"
tomb [D] Tomb key: /home/roxie/tombs/xxxxx.tomb.key
tomb [D] Tomb name: xxxxx (to be engraved)
tomb  .  A password is required to use key /home/roxie/tombs/xxxxx.tomb.key
tomb [D] asking password with tty=/dev/pts/1 lc-ctype=en_GB.UTF-8
tomb [W] Empty password
tomb [W] User aborted password dialog.
tomb [E] No valid password supplied.
tomb [D] Restoring access and modification time for /home/roxie/tombs/xxxxx.tomb
tomb [D] Restoring access and modification time for /home/roxie/tombs/xxxxx.tomb.key

Zsh version is 5.8

~/Tomb master* ❯ zsh --version
zsh 5.8 (x86_64-pc-linux-gnu)

I can comment that one issue I have had with Nixos when moving over is pinentry has always been weird? It took some wrangling with it to get it to work properly with my gpg keys. Only now I'm trying to make new tombs and open old ones which now also has pinentry issues.

Roxxers commented 3 years ago

@jaromil Can confirm issue is fixed with latest commit. Thanks!