Webmin, Virtualmin and APT for Ubuntu and Debian

I often use Webmin and Virtualmin to manage basic stuff on Linux servers, mostly so because others sometime need to change minor settings on these servers, and they may or may not be very familiar with doing things from the CLI.

You can, of course, update Webmin and Virtualmin manually, from within Webmin. But if you’re using APT, there is an automated, better, way of keeping these lovely software packages up to date.


Create a file in /etc/apt/sources.list.d/ like webmin.list

Add the following line to that file:

deb https://download.webmin.com/download/repository sarge contrib

Add Jamie Cameron’s GPG key for the repository like so:

cd /root
wget https://download.webmin.com/jcameron-key.asc
apt-key add jcameron-key.asc

Finalize everything with

apt-get install apt-transport-https
apt-get update

You may now install/update Webmin with via APT (apt-get, aptitude, etc).


Create a file in /etc/apt/sources.list.d/ like virtualmin.list

For Ubuntu 18.04.LTS (“Xenial”), add the following to that file:

deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-xenial main
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal main

There are, of course, sources available for other distributions too. Simply replace xenial above, with the name of the distribution you’re running. You can find a list of the Debian based distributions here: software.virtualmin.com/vm/6/gpl/apt/dists/

Add the virtualmin GPG key for the repository like so:

cd /root
wget http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin-6
apt-key add RPM-GPG-KEY-virtualmin-6

Finalize everything with

apt-get update

You may now install/update Virtualmin via APT (apt-get, aptitude, etc). You can find some more information about this in relation to Virtualmin on the Virtualmin forum.

When your DHCP client has lease renewal issues, Sendmail may be at fault

On one of our VPS instances, I noticed some seriously erratic behavior with the DHCP client taking a long time to renew its leases when the machine was booting up, or failing to renew at all.

It took some time before I noticed this output from dhclient:

/sbin/dhclient-script: 28: .: Can't open /usr/share/sendmail/dynamic

This didn’t make any sense as we never have and never will install sendmail on any VPS. So using apt, I was able to see that one or more of the sendmail packages had “incomplete” status (displayed as ‘c’ in aptitude if you’re using that), i.e. it was not installed but some configuration files remain. After purging those packages, dhclient had no problems whatsoever in renewing the leases.

Who knew sendmail could even trash DHCP 🙂