ubuntu

A 3-post collection

Setting up Automatic Updates for Ubuntu

Keeping your system up to date is the single most important way to prevent security and malware issues.  Ubuntu provides nice tools for maintaining your system, but if you manage it via a command line you may be used to seeing: 1 2 3 packages can be updated. 3 updates are security updates. This is the Ubuntu system notifying you that it noticed there are 3 packages that have updates available.  This check is enabled by default and is part of the update-motd system.  Some background on how this works will provide insight into the workings of Ubuntu and then we’ll talk about automating those updates. Background update-motd is a system program introduced in Ubuntu that allows for the...

Create a Startup / Boot Script under Ubuntu

In managing Unix systems, you will often have occasion to have a process or action performed at boot time. There are several ways of accomplishing this goal, but the right way is to create an init script and configure it to run at the proper run levels. Here’s how to do that under Ubuntu. A valid LSB (Linux Standard Base) Init Script has 4 components: Provide, at least, the following actions: start, stop, restart, force-reload, and status (actually optional) Return proper exit status codes Document runtime dependencies Log messages using the Init.d functions: logsuccessmsg, logfailuremsg and logwarningmsg (optional) To document runtime dependencies you’ll have to define a header on your script. The header is required by the...

Configure SSH2 Access for Updating WordPress

WordPress is one of the most popular blogging platforms on the Internet. One of the first things I do when I setup a new WordPress installation is harden it. You can read about a number of my suggestions in the article Secure Your WordPress Installation. However, one of the more complex activities I undertake is securing the upgrade facility so that it uses SSH for handling all of my site’s updates. This is for Ubuntu 10.04 LTS: Create a “wordpress” user that will be used to manage your site. [shell] % sudo adduser wordpress [/shell] Add the following lines to your wp-config.php, I usually put mine right after the Language definition: [shell] /** * Define Upgrade FTP Usernames and Passwords...