Recently I created a virtual machine using Ubuntu Server 18.04.1. The purpose of this server is to run the UniFi Controller to manage my in-home UniFi Pro AP Units.

Installing Ubuntu 18.04 Server was quite simple and effortless. However, I like to manage my GUI-less servers using Webmin. Simply to see specific information via a web console as opposed to using the command line.

However, upon attempting to install Webmin it failed with a message that “libauthen-pam-perl” was missing and was uninstallable. I then attempted to perform the following:

sudo apt-get install -f

But that did not work.

I started doing some Google searches and most threads I came across suggested installing the missing pieces manually, so I tried that. Again, fail.

I knew at this point that I needed to modify my Repository to get the additional pieces I needed installed. However, I did not know what repository I would need to add but then figured maybe I needed the “universal” repository since I needed files not part of the “main” repository.

Before modifying my repository, I decided to remove Webmin and clean up the system from the failed installed. After doing so I then modified my repository using the following command:

sudo add-apt-repository universe

Then I installed (sudo apt-get install webmin) Webmin, and this time when it came across the “libauthen-pam-perl” issues I simply ran:

sudo apt-get install -f

And the dependencies that were required installed with no issues.

Now that Webmin was up and running, I now needed to install UniFi. If you have ever installed the UniFi Controller you’ll know that you need MongoDB and Java installed. These are pre-requisite packages that need to be there prior to installing the UniFi Controller so that everything goes smooth.

However, during my search for the libauthen-pam-perl, I somehow came across a site where the individual created a script to install the UniFi Controller software along with the dependencies for it. This was a huge time saver and made completing the UniFi Controller install so simple.

The following link provides the script to download on your Ubuntu server and how to run it.

https://community.ubnt.com/t5/UniFi-Wireless/UniFi-Installation-Scripts-UniFi-Easy-Update-Scripts-Works-on/td-p/2375150

Follow the authors instructions to run the script. Once this Script is run, the UniFi Controller is installed and ready to be configured.

This was the easiest UniFi Controller setup I ever performed after getting past the “libauthen-pam-perl” issues. Hopefully, this article can help if you have the same exact issue.