Skip to content

Instantly share code, notes, and snippets.

@agail
Created March 17, 2022 23:36
Show Gist options
  • Save agail/d6e09514a5a794e772181190b9e7074e to your computer and use it in GitHub Desktop.
Save agail/d6e09514a5a794e772181190b9e7074e to your computer and use it in GitHub Desktop.
Duo Unix 2FA on Alpine Linux install

DUO Unix on Alpine Linux compilation and installation guide

Alpine v3.15

apk add build-base linux-pam-dev openssl-dev
cd /tmp
curl -LO https://github.com/duosecurity/duo_unix/archive/refs/tags/duo_unix-1.12.0.tar.gz
tar xvfz duo_unix-1.12.0.tar.gz
cd duo_unix-1.12.0
./configure --with-pam --prefix=/usr
make
make install
  • Login to Duo dashboard
  • Add new Unix Application
  • Edit /etc/duo/login_duo.conf and cat /etc/duo/login_duo.conf > /etc/duo/pam_duo.conf
  • Test 2FA with login_duo -f myusername 'echo "Hello World"'
    • You should only see "Hello World" if the authentication succeeds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment