Subject: pam-gnupg on Alpine

From: Страхиња Радић <[email-masked]>
Date: Fri, 3 Mar 2023 22:39:43 +0100

Hello,

I'm looking to activate pam-gnupg[1] on Alpine. I have read the
pam-gnupg Readme (even before, when I was setting it up on Artix), as
well as Alpine's Wiki page[2] about PAM, and tried installing
util-linux-login.

I have seen that /etc/pam.d/login includes 
base-{auth,account,password,session}, and chose to add pam_gnupg.so to 
/etc/pam.d/base-auth:

==========================/etc/pam.d/base-auth========================
# basic PAM configuration for Alpine.
auth    required        pam_env.so
auth    required        pam_unix.so     nullok_secure
auth    required        pam_nologin.so  successok
auth    optional        pam_gnupg.so store-only

auth    sufficient      pam_unix.so     nullok try_first_pass

account required        pam_nologin.so
account sufficient      pam_unix.so

password        sufficient      pam_unix.so     nullok sha512 shadow 
try_first_pass use_authtok

-session        optional        pam_loginuid.so
-session        optional        pam_elogind.so
session         optional        pam_gnupg.so
session sufficient      pam_unix.so
===================End=of=/etc/pam.d/base-auth========================

However, using pam-gnupg settings (~/.pam-gnupg, etc) which work under
Artix, I'm still being prompted to enter password by GnuPG-using
programs, such as isync.

Can someone point out how can I set up pam-gnupg under Alpine? I'm not
sure if I picked the correct location to insert pam_gnupg.so calls,
for example.

Thanks in advance,
Strahinya

[1]: https://github.com/cruegge/pam-gnupg
[2]: https://wiki.alpinelinux.org/wiki/PAM