I was trying to explain to a colleague a few days ago how a few shell commands can be really useful, when today I came across an example to try to illustrate. My problem was that I had 245 log files each about 70-80MB in size – roughly 4 million lines in each log file…. Read more »
Posts By: jonny
Postfix with Amavisd-new on Plesk & Centos
For future reference: I installed Amavisd on CentOS and configured it to be used within Postfix following instructions here and here. I had also configured ClamAV and Spamassassin but those instructions are for another day. yum install amavisd-new I had some error messages starting amavisd and it was necessary for me to install the Mail::SPF… Read more »
Windows 2008 Disk Space and CBS.log

I noticed one of our Windows 2008 servers running low on space on the C: drive and used Disk Usage Analyzer to scan the disk. I had been suspecting the winsxs directory as this has been a culprit in the past: However, this time it turned out to be the C:\Windows\Logs\CBS\CBS.log file at almost 18GB:… Read more »
Delaying Dropbox Start in Ubuntu

The length of time it was taking after logging in to get Dropbox started was beginning to get on my nerves. The following worked for me: Open the Dropbox Preferences dialog and disable the option for “Start Dropbox on system startup” Next choose Applications > System Tools > Preferences > Startup Applications and add a… Read more »
PHP Accessing an IMAP Mailbox
This week I started playing around with PHP and a honeypot mailbox I had created some time ago. The following PHP is what I have been using thus far – plenty more work to do: $hostname = ‘{imap.domain.uk:143/notls}INBOX’; $username = ‘honeypot’; $password = ‘topsecret’; $inbox = imap_open($hostname,$username,$password) or die(‘Cannot connect to Mail server as… Read more »
Testing Proxy.pac Files
I decided to do a bit of checking on the proxy.pac file we were using. I grepped through our Apache access log files to pull out all of the IP addresses accessing the file over the year: zgrep “proxy.pac” ./2013-??-??.access_log.gz | awk ‘{print $1}’ | awk -F “:” ‘{print $2}’ | sort | uniq >… Read more »
Coloring Bash Output

I wanted to add some colour to the output of my bash shell script and was able to do so with the following – very simple red and green: if [ $COUNT -eq 0 ]; then tput setaf 2 echo “OK There are no problems” tput sgr0 else tput setaf 1 echo “WARNING There are… Read more »
MS SQL Server Monitor Queries

On a misbehaving application we were seeing 200 transactions per second to a MS SQL Server database when normally there would be approximately 10 queries per second. To analyse the type of SQL queries received by the server I used ‘SQL Server Profiler’ as follows: File > New Trace … Connect to the database if… Read more »
Radius with LDAP Authentication
The notes here are a quick howto for using LDAP authentication against Active Directory. It is possible to use Samba/Winbind/Kerberos authentication within Radius too and I may post those notes when I get a chance but for now this is how I implemented it with LDAP. Install required software on CentOS/Red Hat: yum install freeradius… Read more »
Apache Directory Studio (Softerra Alternative)

I was looking for an alternative to the Windows software ‘Softerra LDAP Browser’ and I stumbled upon Apache Directory Studio. Apache Directory Studio is based on Eclipse and allows browsing to LDAP directories, searching and editing. I tested it with connections to Active Directory, Novell eDirectory and another lesser known LDAP directory. Install Apache Directory… Read more »