Skip to content

Instantly share code, notes, and snippets.

View sidequestboy's full-sized avatar

Jamie Macdonald sidequestboy

  • Canada
View GitHub Profile
@Apsu
Apsu / preset.sh
Last active March 13, 2024 01:24
GPG passphrase preset to be called from pam_exec
#!/bin/bash
# grab PAM-provided auth token
read token
# gpg-preset-passphrase is often in /usr/libexec or /usr/lib/gnupg
preset=/usr/lib/gnupg/gpg-preset-passphrase
# grab our user, USER isn't always set
USER=$(id -un)