Linux – Should I have to enable automatic update on Debian lenny stable

debianlinuxSecurityupdate

I have installed a new Linux Debian lenny server that will be a LAMP and a Subversion server.
Should I have to enable automatic updates?

If I enable it, I am sure that I have the latest security patches. It also should not break my system since Debian stable provides only security patches.
If I install them manually, I may be on high security risk during multiple days & week.

Please keep in mind that I am not an full time system administrator, so I do not have the time to look at security bulletins.

What are you usually doing with your servers? What is your advice?

Best Answer

(Warnings regarding automatic upgrades have already been voiced by previous posters.)

Given the track record of the Debian Security team in the last few years, I consider the risks of broken upgrades far less than the benefit of having automatic updates on seldom-visited systems.

Debian Lenny comes with unattended-upgrades, which originated from Ubuntu and is considered to be the defacto solution for unattended upgrades for Debian starting from Lenny/5.0.

To get it up and running on a Debian system you need to install the unattended-upgrades package.

Then add these lines to /etc/apt/apt.conf:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Unattended-Upgrade "1";

(Note: In Debian Squeeze/6.0 there is no /etc/apt/apt.conf. The preferred method is to use the following command, which will create the above lines in /etc/apt/apt.conf.d/20auto-upgrades:)

sudo dpkg-reconfigure -plow unattended-upgrades

A cron job is then run nightly and checks if there are security updates which need to be installed.

Actions by unattended-upgrades can be monitored in /var/log/unattended-upgrades/. Be wary, that for kernel security fixes to become active, you need to reboot the server manually. This can also be done automatically in course of a planned (e.g. monthly) maintenance window.