One of the most effective things that you can do to secure any system is to keep it up to date, ideally this can be done automatically.

Cron-apt is a package that helps you do this.

Instalation

sh sudo apt-get install cron-apt

Configuration

cron-apt has two configuration files

/etc/cron.d/cron-apt

contains the configuration for when it will run.

the default is every night at 4 o’clock

/etc/cron-apt/config

Is the configuration for when cron-apt will run.

You will likely want to add two lines to this file

MAILTO=”Root@mydomain.com“
MAILON=”always”

replacing the email address with the ones that you want to be notified of updates.
Further considerations

There is one issue with this set up. cron-apt will download the updates and notify you, but will not install them.

You will still need to do in and run

sh sudo apt-get dist-upgrade

To apply these updates.

My next post will be on how to automatically install security updates.