0

Using expect to check/navigate to correct menu and send desired cmd input After update of Yubikey-manager etc, pin code popup window appears... that make the script to fail

(Default pin are used in this example)

#!/usr/bin/expect -f

set prompt "gpg/card\>"
set keyprompt "\\? "

eval spawn gpg2 --card-edit
expect "Yubico Yubikey"
expect $prompt
send -- "admin\r"
expect $prompt
send -- "generate\r"
expect "Make off-card backup of encryption key"
send -- "n\r"
expect "PIN:"
send -- "123456"
# ..... and continue

Any input how it should be solved?

How to disable pin code popup window?

Johan
  • 1
  • 1
  • most probably you see pineentry dialog. Try this: https://superuser.com/questions/520980/how-to-force-gpg-to-use-console-mode-pinentry-to-prompt-for-passwords – Martin Mucha Apr 02 '23 at 14:47

0 Answers0