As I’m attempting to follow the Poldi option in the Nitrokey instructions you’ve provided, I get stuck on the step where I dump my Librem Key public key into the Poldi local db by using the following command:
I’ve replaced with my Application ID from the Librem Key (using the “gpg --card-status | grep Application” commands).
My terminal output is as follows:
gpg-connect-agent: no running gpg-agent - starting ‘/usr/bin/gpg-agent’
gpg-connect-agent: failed to create temporary file '/root/.gnupg/.#########: No such file or directory
gpg-connect-agent: can’t connect to the agent: No such file or directory
gpg-connect-agent: error sending standard options: No agent running
I wonder if there is a way to manually create this file in the Poldi local db, so that I can avoid running that above command. Based on the terminal output, is it clear to you what my current problem is?
Now I’m able to dump my gpg public key from the Librem Key to the Poldi local db.
I’ve added the line “auth required pam_poldi.so” to the /etc/pam.d/sudo and /etc/pam.d/gdm-password files directly above the line containing “@include common-auth”.
The setup now works for me.
I now require my Librem Key to be inserted while performing sudo command and logging into PureOS. I first have to unlock the Librem Key with my PIN. Then I’m prompted with the PureOS login/sudo password.
I suspect I was getting the card removed error because gpg-connet-agent must be run using the same account that has the imported public key. I am avoiding importing the public key into the root account. If I run gpg-connect-agent as my user it finds the data. I either grant my user access to the file in /etc/poldi/localdb/keys or I copy it there as a second step.
perhaps the next release will address some of these issues? One challenge is that the user may want different security models which would have to be accounted for as part of the setup. e.g. passwordless vs smartcard or password