How To Install Google Authenticator PAM Module Directly From Source

Basil A.
1 min readDec 27, 2020
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.

--

--

Basil A.

A Software Engineer with interests in System Design and Software Engineering done right.