How To Install Google Authenticator PAM Module Directly From Source

Photo by Jason Dent on Unsplash

This article will describe how to compile Google Authenticator directly from source by cloning the source code from the official GitHub repository.
If you need to know why you should compile and avoid the apt Ubuntu package, please read the previous article first.

How to Compile google-authenticator-libpam From GitHub?

Here we go, these steps will be sufficient to git clone it and compile it on your Ubuntu server:

apt update
apt install libqrencode-dev -y
apt install libtool -y
apt install libpam-dev -y
apt install autoconf -y
apt install make -y
cd /root
git clone https://github.com/google/google-authenticator-libpam.git
cd google-authenticator-libpam
./bootstrap.sh
./configure --libdir=/lib/x86_64-linux-gnu
make
make install
cd ..
rm -rf google-authenticator-libpam
apt remove libtool -y
apt remove libpam-dev -y
apt remove autoconf -y
apt remove make -y

In the upcoming articles, I will describe a bullet-proof way to set it up.

A Software Engineer with interests in data storage and database systems done right.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store