Skip to content

Instantly share code, notes, and snippets.

@heiglandreas
Last active February 13, 2024 16:43
Show Gist options
  • Save heiglandreas/66b37c138100e5ff10aea71453ca1a9d to your computer and use it in GitHub Desktop.
Save heiglandreas/66b37c138100e5ff10aea71453ca1a9d to your computer and use it in GitHub Desktop.
Set up an ubuntu docker container with google-authenticator so that you can get a 2FA config file
docker run -it --rm ubuntu
apt update
apt install curl build-essential autoconf libtool vim libpam-dev
curl -LO https://github.com/google/google-authenticator-libpam/archive/refs/tags/1.09.tar.gz
tar xvzf 1.09.tar.gz
cd google-authenticator-libpam-1.09/
./bootstrap.sh
./configure
# This will break at some points. Check the script and fix it.
vi ./configure
./configure
make
make install
google-authenticator
cat /root/.google_authenticator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment