Archive for Linux

Control user access to SSH

Got a shiny new Linux box on your network but don’t want all your users connecting to it via SSH? Control access by editing the SSH configuration file and using the AllowUsers directive like so:

AllowUsers joeuser

To add multiple entries, either separate users with a space, or write an entirely new line:

AllowUsers joeuser philwiffen
AllowUsers joeuser
AllowUsers philwiffen

OpenOffice Save As .doc by default

OpenOffice

To get OpenOffice to Save in Microsoft Word .doc format by default, follow these steps:

  • Tools > Options
  • Load/Save > General
  • In the bottom right of the window, look for “Always save as” and pick your poison ;)

I know that saving in a proprietary format over an open standard is bad practice, but sometimes in Business you need to maintain interoperability with the de facto standard; in this case: Microsoft Word.

OpenOffice Save As .doc by default

Adding Calendar functionality to Mozilla Thunderbird

In a business environment, people who switch from Microsoft Outlook to Mozilla Thunderbird often miss having the calendar/task features in Outlook. Fortunately, you can add Calendar and Task functionality to Thunderbird with the Lightning add-on.

  • Go to the Lightning download page
  • Right click on the download link and Save As… (If you don’t, Firefox might try to install the add-on itself.)
  • Open up Thunderbird and click on Tools > Add-ons
  • Install the Lightning file you just downloaded
  • Once you’re done, restart Thunderbird, and start using your new Calendar feature!
  • If you need Holiday calendars, you can get them here

Log rotation on Plesk 8

A few of our websites receive high traffic and, as a result, the apache log files grow very large, very quickly. By default, Plesk rotates logs every 2,025,139 KB (2GB). This is way too large for a virtualised server such as ours, which provides 10GB of precious disk space.

To combat this, I set up a regular log rotation in Plesk like so:

  • Log in to Plesk.
  • Domains > yourdomain.com > Log Manager > Log Rotation
  • Choose the log rotation condition.

Plesk log rotation

I choose monthly, but if you’re rapidly running out of disk space you might want to set a shorter time span, or set a low size limit. Don’t forget to enable compression to save on disk space!

Install smartctl on Ubuntu

To install smartctl (and smartd with it):

sudo apt-get install smartmontools

Why would you want SmartMonTools?

The smartmontools package contains two utility programs (smartctl and smartd) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (S.M.A.R.T.) built into most modern ATA and SCSI hard disks. It is derived from the smartsuite package, and includes support for ATA/ATAPI-5 disks. It should run on any modern Linux system.

Ubuntu smartmontools page

Very handy; especially as the OS drive just died in the RAID5 box :( I’m now taking extra precautions!

Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-ShareAlike 2.0 UK: England & Wales