Posts Categorized: linux

Converting Squid Timestamps

I found the following perl snippet here to convert a squid log file into one with readable times: #! /usr/bin/perl -ps/^\d+\.\d+/localtime $&/e; It can be used like this:./timeconvert.pl inputfile.txt > outputfile-withhumantime.txt

Spamassassin Upgrade to 3.2.4 Problem

We probably don’t have a straight-forward spamd configuration so there wasn’t much noise out there from other people suffering this same issue so i think it may be peculiar to us.I upgraded from spamassassin 3.2.3 to 3.2.4 but received the following error when starting the service: cannot use –sql-config without -u As we are using… Read more »

NTP Daemon

On Ubuntu:Install with: apt-get install ntp-simple ntpdate Edit /etc/ntp.conf and add your ntp servers in the server section e.g. server ntp.domain.tld Restart the service: /etc/init.d/ntp-server restart On CentOS/Red Hat:Ensure that ntp is installed service –list ntpd or install with: yum install ntp Edit /etc/ntp.conf and add your ntp servers in the server section e.g. server… Read more »

Webcam on Ubuntu Just Works : Canyon CNR-WCAM413

I bought this particular webcam Canyon CNR-WCAM413 through Amazon as it was reported to just work on Linux – and it does on Ubuntu 8.04. Thanks to that french guy who laboured away at making drivers for all these devices! Plugged it in, booted up and an lsusb showed: jonny@nova:~$ lsusbBus 005 Device 003: ID… Read more »

Change Hostname

Great article here.Check current hostname: hostname Change the hostname in the following files: vi /etc/sysconfig/networkvi /etc/hosts Now run: hostname mynewhostname restart networking /etc/init.d/network restart

Forward Root’s Mail

Forwarding the email sent to root on a system to another email address.vi /etc/aliases # Person who should get root’s mailroot:   myreal@emailaddress.com The run:/usr/bin/newaliases Test it.

Turn off pings

The follwing file can be set to 0 or 1. 0 does not allow pings on any interface and 1 switches it back on. /proc/sys/net/ipv4/icmp_echo_ignore_all

up2date – unknown GPG signature

I had previously installed lftp – can’t remember from where but it was now stopping up2date due to a missing key. The package lftp-3.7.3-1.el4.rf is signed, but with an unknown GPG key. Aborting…Package lftp-3.7.3-1.el4.rf has a unknown GPG signature. Aborting… I need to sort out the key but temporarily sorted with: up2date –nox –configure and… Read more »

Password-less SSH in 5 minutes

Connecting to remote servers using SSH is very common in systemadministration and involves entering the command : sshuser@remotehostname and the corresponding password. It is possible to use public keys with SSH to allow the remote host to accept SSH connections from you without password authentication. This can beuseful for automatically scheduled tasks (CRON jobs) for… Read more »

PHP 5.2.0 Upgrade and Issues

In the official yum repositories for Red Hat/CentOS for RHEL5 / CentOS 5.1 the current version of PHP is (at time of writing) 5.1.6 however when trying to install the Magento e-commerce application required PHP version 5.2.0 or higher. To upgrade PHP to 5.2.5 I followed some instructions here on using the Remi repository i.e…. Read more »