Automatic security updates.
A friend asked me by twitter for a software for automatic security updates in Debian.
Honestly I don’t trust in automatic stuff, but this software appears interesting.
I searched in the cache: apt-cache search automatic update and I found cron-apt.
How to use (at least in Debian)
I.- Yes Mr. Obviously, install it.
# apt-get install cron-apt
II.- Configure.
The main config file is in /etc/cron-apt/config
They are a lot of options, but the important is uncomment:
OPTIONS="-o quiet=1 -o Dir::Etc::SourceList=/etc/apt/security.sources.list"
And create the file:
# echo "deb http://security.debian.org/ squeeze/updates main contrib non-free" > /etc/apt/security.sources.list
Now we need edit /etc/cron-apt/action.d/3-download, by default is:
root@skynet:~# cat /etc/cron-apt/action.d/3-download
autoclean -y
dist-upgrade -d -y -o APT::Get::Show-Upgraded=true
root@skynet:~#
Change by this:
root@skynet:~# cat /etc/cron-apt/action.d/3-download
autoclean -y
upgrade -u -y
root@skynet:~#
And … all done dears nerds!
HINT: Put your email in /etc/cron-apt/config at the var “MAILTO” and change the var “MAILON” by upgrade to receive and email in every upgrade.
Happy upgrade!
Comments
One Response to “Automatic security updates.”
Leave a Reply
Apticron had worked for me and I think, don’t install automagically, but emails when there are updates…
I’m been testing unattended updates, without too much trouble, just needed to change the pre and post invocation of dpkg (I use a hardened /tmp partition).