Planet SAGE-AU

February 22, 2012

Robert MibusDesktop SCRAM

So the problem goes like this:

  • A coworker asks if I want to join them for a coffee. (This happens multiple times per day, FWIW). I say "Yes!" and jump up...
  • ...then sit back down to lock my computer screen, and hop back up...
  • ...only to realise I've left my music playing - so I sit down, unlock my screen, pause my music, and re-lock my screen...
  • ...at which point, my coworkers have already long since disappeared.

My solution? A Desktop SCRAM button, where I can just go whack and walk away with impunity.

It's made up of a USB-serial cable, and a ~$10 button. The button's two contacts are wired to the DSR and Ground lines respectively.

The code is available (GPLv3) at: http://github.com/mibus/DesktopScram/

Philip Yarraldapsearch - exporting photos to named files

Simple requirement: export all staff photos from our LDAP repository. That bit is easy:

ldapsearch -h ldap -x -t -b "ou=People,dc=example,dc=com,dc=au"

But the files end up being called things like file:///tmp/ldapsearch-jpegPhoto-G4hm3V - not quite what we're after here. We want the pictures with the user ID as part of the name - e.g. pyarra.jpeg

After a bit of experimentation, I came up with this simple, elegant one-liner. OK, it's not all that simple, or elegant, but it is one-line. One long, ugly line:

ldapsearch -h ldap -t -x -b 'ou=People,dc=example,dc=com,dc=au'  uid | awk '$1 ~ /uid:/ {print $2}' | while read LUID; do ldapsearch -h ldap -t -x -b 'ou=People,dc=example,dc=com,dc=au' "uid=$LUID" jpegPhoto | (FILENAME=$(awk '$1 ~ /jpegPhoto:</ {print $2}' | sed -e 's/file:\/\///'); mv "$FILENAME" "/tmp/mugshots/$LUID.jpeg"); done

I probably should have bitten the bullet and done it as a Perl script. But that's the lure of the one-liner, eh? If I just go a little further, I'll have it!

February 15, 2012

Russell CokerLinks February 2012

Sociological Images has an interesting article about the attempts to apply the word “Camping” to OWS and framing the issues [1].

Lester Macgurdy wrote an insightful article about “the snake”, a new technique for OWS protesters to beat riot police [2].

Ron Barassi suggests that “Australia Day” be celebrated on the 27th of May to commemorate the day in 1967 when the Australian constitution was amended to not be racist [3]. The current “Australia Day” is often referred to as “Invasion Day”. IMHO Ron deserves another “Best and Fairest” award.

Stefon Harris gave an entertaining TED talk about improv Jazz music titled “There Are No Mistakes on the Bandstand” [4]. It seems that his concepts can apply to some extent to many collaborative projects.

John Robb wrote an interesting article about the future of drone (UAV) warfare [5]. He suggests that having one person control each drone is a temporary thing and that the future is to have a cloud of cheap autonomous drones taking strategic control from one person. His comparison of Starcraft players to future drone fighters is interesting.

The OWS movement is branching out into other related areas, OccupyYourHomes.org is one of the latest ones [6]. When banks try to forclose on homes without good cause the OWS people are protesting.

Cory Doctorow wrote an important article for The Guardian about corporations using the Youtube ContentID system to pirate works that other people have uploaded [7].

Matt Taibbi’s description of Goldman Sachs as “a great vampire squid wrapped around the face of humanity, relentlessly jamming its blood funnel into anything that smells like money” will never die [8]. It has spawned many other creative descriptions of the evil and greed of Goldman Sachs and even Lloyd Blankfein of Goldman Sachs describes his company as having “burned down the Reichstag, shot the Archduke Ferdinand and fired on Fort Sumter” – he was trying to use satire, but I don’t think that Goldman Sachs people would act differently to Fritz Thyssen.

Keith Packard wrote an interesting article about the Calypso CalDAV system which he uses with Android [9]. He makes lots of good points about how to improve calendaring and contacts on Android, unfortunately I lack time to fiddle with such things at the moment so I’ll stick with Google in spite of the risks.

Asheesh Laroia wrote a great article about the problems with short (32bit) GPG keys [10]. It seems that creating keys with matching ID numbers isn’t particularly difficult and that GPG doesn’t handle them as well as we would like giving the possibility of at best annoying DoS attacks and at worse security problems due to using the wrong key.

Sociological Images has an interesting article about when game show audiences are trustworthy [11]. It seems that French people don’t want an undeserving person to win so they will intentionally advocate the wrong answer if the contestant should know it.

Paul Wayper gave a great lecture titled “SE Linux for Everyone” [12]. He covers the basics of SE Linux in a user-friendly way and explains some simple solutions to common problems which don’t involve compromising system security.

Paul Tassi wrote an insightful article for Forbes about piracy [13]. His conclusion is that the media companies should make it cheaper and easier to be a customer and not spend insane amounts of money on low quality products.

The Reid Report has an interesting article about Ron Paul’s racism [14]. Ron Paul is generally well regarded outside the US because he wants the US government to stop meddling in the affairs of other countries, but while he’s less bad than other US politicians in terms of foreign policy that doesn’t make him a good person.

Anonymous hacked some mailboxes belonging to a neo-Nazi group and found links to Ron Paul [15]. I’ve always been suspicious of the way Ron Paul wanted to avoid anti-racism legislation on supposed Libertarian principles.

The Reid Report has an interesting summary of Ron Paul news plus some criticism of Glenn Greenwald and others who associate with him [16].

Related posts:

  1. Links February 2011 Australia’s Department of Finance has mandated that the MS-Office document...
  2. Links January 2012 Cops in Tennessee routinely steal cash from citizens [1]. They...
  3. Links February 2009 Michael Anissimov writes about the theft of computers from the...

February 13, 2012

Russell CokerCooling a Thinkpad

Late last year I wrote about the way that modern laptops suck [1]. One of the problems that inspired that post was the excessive heat generated by my Thinkpad T61.

There is a partial solution to this, Fool Control explains how the kernel option pcie_aspm=force can be used on kernels from 2.6.38 onwards to solve a heat regression problem [2]. I applied this to my Thinkpad T61 and the result was that on a cool evening (ambient temperature about 24C) the temperature changed from 85C to 66C on the NVidia video card, and for the “virtual devices” it changed from 80C and 78C to 60C and 61C. I’m not sure exactly what each of those measurements refers to, but it seems that the change was somewhere between 17C and 20C.

This changes the system from being almost unbearable to use to being merely annoyingly warm.

I’m not going to make my laptop be my primary computing device again though, the combination of a desktop system with a 27″ monitor and an Android phone is working quite well for me [3]. But I haven’t yet got version control systems working for all my software. Also Wouter suggested using NBD which is something I haven’t got working yet and probably won’t until I can swap on it and therefore have a diskless workstation. Finally I still haven’t got the “Chrome to Phone” browser extension working such that a page I’m viewing at home can be loaded on my phone.

Related posts:

  1. Taking my Thinkpad Apart and Cooling Problems I’ve been having some cooling problems with my Thinkpad recently....
  2. thinkpad back from repair On Tuesday my Thinkpad was taken for service to fix...
  3. I Just Bought a new Thinkpad and the Lenovo Web Site Sucks I’ve just bought a Thinkpad T61 at auction for $AU796....

February 11, 2012

Russell CokerMagic entries for BTRFS and Software RAID

I’ve just discovered that the magic database for the file(1) command in Debian/Unstable has no support for Linux Software RAID and that it’s support for BTRFS is lacking (no reporting of space used, number of devices, or the UUID). Below is my first draft of a change to fix these problems. I would appreciate it if someone with a big-endian system could test these out and let me know how they go, I suspect that I will have to change the “lelong” types to “long” but I’m not sure.

4096 lelong 0xa92b4efc Linux Software RAID
>4100 lelong x version 1.2 (%d)
>4112 belong x UUID=%8x:
>4116 belong x \b%8x:
>4120 belong x \b%8x:
>4124 belong x \b%8x
>4128 string x name=%s
>4168 lelong x level=%d
>4188 lelong x disks=%d

0 lelong 0xa92b4efc Linux Software RAID
>4 lelong x version 1.1 (%d)
>16 belong x UUID=%8x:
>20 belong x \b%8x:
>24 belong x \b%8x:
>28 belong x \b%8x
>32 string x name=%s
>72 lelong x level=%d
>92 lelong x disks=%d

# BTRFS
0×10040 string _BHRfS_M BTRFS Filesystem
>0x1012b string >\0 label "%s",
>0×10090 lelong x sectorsize %d,
>0×10094 lelong x nodesize %d,
>0×10098 lelong x leafsize %d,
>0×10020 belong x UUID=%8x-
>0×10024 beshort x \b%4x-
>0×10026 beshort x \b%4x-
>0×10028 beshort x \b%4x-
>0x1002a beshort x \b%4x
>0x1002c belong x \b%8x,
>0×10078 lequad x %lld/
>0×10070 lequad x \b%lld bytes used,
>0×10088 lequad x %lld devices

Related posts:

  1. Label vs UUID vs Device Someone asked on a mailing list about the issues related...
  2. Starting with BTRFS Based on my investigation of RAID reliability [1] I have...
  3. Software vs Hardware RAID Should you use software or hardware RAID? Many people claim...

February 10, 2012

Russell CokerStarting with BTRFS

Based on my investigation of RAID reliability [1] I have determined that BTRFS [2] is the Linux storage technology that has the best potential to increase data integrity without costing a lot of money. Basically a BTRFS internal RAID-1 should offer equal or greater data protection than RAID-6.

As BTRFS is so important and so very different to any prior technology for Linux it’s not something that can be easily deployed in the same way as other filesystems. It is possible to easily switch between filesystems such as Ext4 and XFS because they work in much the same way, you have a single block device which the filesystem uses to create a single mount-point. While BTRFS supports internal RAID so it may have multiple block devices and it may offer multiple mountable filesystems and snapshots. Much of the functionality of Linux Software RAID and LVM is covered by BTRFS. So the sensible way to deploy BTRFS is to give it all your storage and not make use of any other RAID or LVM.

So I decided to do a test installation. I started with a Debian install CD that was made shortly before the release of Squeeze (it was first to hand) and installed with BTRFS for the root filesystem, I then upgraded to Debian/Unstable to get the latest kernel as BTRFS is developing rapidly. The system failed on the first boot after upgrading to Unstable because the /etc/fstab entry for the root filesystem had the FSCK pass number set to 1 – which wasn’t going to work as no FSCK program has been written. I changed that number to 0 and it then worked.

The initial install was on a desktop system that had a single IDE drive and a CD-ROM drive. For /boot I used a degraded RAID-1 and then after completing the installation I removed the CD-ROM drive and installed a second hard drive, after that it was easy to add the other device to the RAID-1. Then I tried to add a new device to the BTRFS group with the command “btrfs device add /dev/sdb2 /dev/sda2” and was informed that it can’t do that to a mounted filesystem! That will decrease the possibilities for using BTRFS on systems with hot-swap drives, I hope that the developers regard it as a bug.

Then I booted with an ext3 filesystem for root and tried the “btrfs device add /dev/sdb2 /dev/sda2” again but got the error message “btrfs: sending ioctl 5000940a to a partition!” which is not even found by Google.

The next thing that I wanted to do was to put a swap file on BTRFS, the benefits for having redundancy and checksums on swap space seem obvious – and other BTRFS features such as compression might give a benefit too. So I created a file by using dd to take take from /dev/zero, ran mkswap on it and then tried to run swapon. But I was told that the file has holes and can’t be used. Automatically making zero blocks into holes is a useful feature in many situations, but not in this case.

So far my experience with BTRFS is that all the basic things work (IE storing files, directories, etc). But the advanced functions I wanted from BTRFS (mirroring and making a reliable swap space) failed. This is a bit disappointing, but BTRFS isn’t described as being ready for production yet.

Related posts:

  1. Discovering OS Bugs and Using Snapshots I’m running Debian/Unstable on an EeePC 701, I’ve got an...
  2. Reliability of RAID ZDNet has an insightful article by Robin Harris predicting the...
  3. How I Partition Disks Having had a number of hard drives fail over the...

February 08, 2012

Russell CokerMore DRBD Performance tests

I’ve previously written Some Notes on DRBD [1] and a post about DRBD Benchmarking [2].

Previously I had determined that replication protocol C gives the best performance for DRBD, that the batch-time parameters for Ext4 aren’t worth touching for a single IDE disk, that barrier=0 gives a massive performance boost, and that DRBD gives a significant performance hit even when the secondary is not connected. Below are the results of some more tests of delivering mail from my Postal benchmark to my LMTP server which uses the Dovecot delivery agent to write it to disk, the rates are in messages per minute where each message is an average of 70K in size. The ext4 filesystem is used for all tests and the filesystem features list is “has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize“.

p4-2.8
Default Ext4 1663
barrier=0 2875
DRBD no secondary al-extents=7 645
DRBD no secondary default 2409
DRBD no secondary al-extents=1024 2513
DRBD no secondary al-extents=3389 2650
DRBD connected 1575
DRBD connected al-extents=1024 1560
DRBD connected al-extents=1024 Gig-E 1544

The al-extents option determines the size of the dirty areas that need to be resynced when a failed node rejoins the cluster. The default is 127 extents of 4M each for a block size of 508MB to be synchronised. The maximum is 3389 for a synchronisation block size of just over 13G. Even with fast disks and gigabit Ethernet it’s going to take a while to synchronise things if dirty zones are 13GB in size. In my tests using the maximum size of al-extents gives a 10% performance benefit in disconnected mode while a size of 1024 gives a 4% performance boost. Changing the al-extents size seems to make no significant difference for a connected DRBD device.

All the tests on connected DRBD devices were done with 100baseT apart from the last one which was a separate Gigabit Ethernet cable connecting the two systems.

Conclusions

For the level of traffic that I’m using it seems that Gigabit Ethernet provides no performance benefit, the fact that it gave a slightly lower result is not relevant as the difference is within the margin of error.

Increasing the al-extents value helps with disconnected performance, a value of 1024 gives a 4% performance boost. I’m not sure that a value of 3389 is a good idea though.

The ext4 barriers are disabled by DRBD so a disconnected DRBD device gives performance that is closer to a barrier=0 mount than a regular ext4 mount. With the significant performance difference between connected and disconnected modes it seems possible that for some usage scenarios it could be useful to disable the DRBD secondary at times of peak load – it depends on whether DRBD is used as a really current backup or a strict mirror.

Future Tests

I plan to do some tests of DRBD over Linux software RAID-1 and tests to compare RAID-1 with and without bitmap support. I also plan to do some tests with the BTRFS filesystem, I know it’s not ready for production but it would still be nice to know what the performance is like.

But I won’t use the same systems, they don’t have enough CPU power. In my previous tests I established that a 1.5GHz P4 isn’t capable of driving the 20G IDE disk to it’s maximum capacity and I’m not sure that the 2.8GHz P4 is capable of running a RAID to it’s capacity. So I will use a dual-core 64bit system with a pair of SATA disks for future tests. The difference in performance between 20G IDE disks and 160G SATA disks should be a lot less than the performance difference between a 2.8GHz P4 and a dual-core 64bit CPU.

Related posts:

  1. DRBD Benchmarking I’ve got some performance problems with a mail server that’s...
  2. Some Notes on DRBD DRBD is a system for replicating a block device across...
  3. Ethernet bonding Bonding is one of the terms used to describe multiple...

Philip YarraNagios, check_openmanage and the dreaded out-of-date firmware

I started to add some nagios monitoring for one of our Dell PowerEdge 1950 servers, but was a bit puzzled when I got this response:

nagios# /usr/local/libexec/nagios/check_openmanage -s -H mq-citrix-4
WARNING: Controller 0 [PERC 6/i Integrated]: Firmware '6.1.1-0047' is out of date

Hmmm... I'm not sure I want to start dropping production servers to upgrade firmware, just to make the monitoring system happy. Luckily, the check_openmanage script is intelligently written, and offers lots of options to blacklist checks of some items. Cool!

So for us, I can simply do this:

nagios# /usr/local/libexec/nagios/check_openmanage -H mq-citrix-4 -b ctrl_fw=0
OK - System: 'PowerEdge 1950 III', SN: 'FW86Y1S', 16 GB ram (4 dimms), 1 logical drives, 2 physical drives

To make this work in the config file for Nagios, I added the highlighted bit to the host definition:

 define host{
        use                     windows-server
        host_name               mq-citrix-4
        _openmanage_options     -b ctrl_fw=0
        }


Now I'm wondering if it's a little bit wrong to hide warnings about out-dated firmware. Oh well...

January 28, 2012

Mark UnwinEinstein quote

“Any fool can make things bigger, more complex, and more violent. It takes a touch of genius-and a lot of courage-to move in the opposite direction.”
Albert Einstein.

January 25, 2012

Mark UnwinIt's Australia Day!

w00t!!!
Best country in the world (OK, so I'm slightly biased).

January 19, 2012

Philip YarraNsclient++ on Windows 2000 can't understand hostnames?

Just installed Nsclient++ on two boxes - one Windows 2003 server, the other Windows 2000 Server (yeah, I know, Windows 2000 server is getting a bit long in the tooth, but if it ain't totally broke...)

Anyway, I restricted which hosts could talk to the NSClient to just the Nagios server, called, amazingly, nagios.mydomain.com. For w2k3, that works, access is allowed. For the Windows 2000 Server, I had to go put the IP address in place of the hostname in nsc.ini before it would allow access. And yeah, the Windows 2000 server can resolve the IP address back to the hostname, using nslookup.

I don't know if that's a Windows 2000 oddity, a NSClient for w2k oddity, or just a sign that it's time to call it a day :-)

January 17, 2012

Robert MibusLinux.Conf.Au – IPv6 & automatic reverse DNS mappings

Today is the day for my IPv6/Automatic reverse DNS mappings presentation at LCA2012.

Get the custom pymds fork here; it'll be merged upstream shortly-ish.

January 13, 2012

Gavin CarrAoE on RHEL/CentOS

I'm a big fan of Coraid and their relatively low-cost storage units. I've been using them for 5+ years now, and they've always been pretty well engineered, reliable, and performant.

They talk ATA-over-Ethernet (AoE), which is a very simple non-routable protocol for transmitting ATA commands directly via Ethernet frames, without the overhead of higher level layers like IP and TCP. So they're a lighter protocol than something like iSCSI, and so theoretically higher performance.

One issue with them on linux is that the in-kernel 'aoe' driver is typically pretty old. Coraid's latest aoe driver is version 78, for instance, while the RHEL6 kernel (2.6.32) comes with aoe v47, and the RHEL5 kernel (2.6.18) comes with aoe v22. So updating to the latest version is highly recommended, but also a bit of a pain, because if you do it manually it has to be recompiled for each new kernel update.

The modern way to handle this is to use a kernel-ABI tracking kmod, which gives you a driver that will work across multiple kernel updates for a given EL generation, without having to recompile each time.

So I've created a kmod-aoe package that seems to work nicely here. It's downloadable below, or you can install it from my yum repository. The kmod depends on the 'aoetools' package, which supplies the command line utilities for managing your AoE devices.

kmod-aoe (v78):

aoetools (v32):

There's an init script in the aoetools package that loads the kernel module, activates any configured LVM volume groups, and mounts any filesystems. All configuration is done via /etc/sysconfig/aoe.

January 11, 2012

Philip YarraSolaris and tape drives

I was faced with an interesting question today: we have a DDS tape drive of some sort attached to a Solaris machine, and a tape we need to read from. How do we discover what type of tape drive it is, what device it's attached with, and go get some data off the tape?

To show attached SCSI devices: cfgadm -al lists a tape device at rmt/3

To show the device details: iostat -E

bash-3.00# iostat -E
st4 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: ARCHIVE Product: Python 04687-XXX Revision: 6610 Serial No:þÊݺþÊݺþÊݺ


Looked up the Python 04687-XXX - it's a DDS-2 tape drive according to
http://www.freebsd.org/doc/en/articles/storage-devices/x528.html#HW-STORAGE-PYTHON-04687.

The tape we wanted to restore from is a DDS-1 (identified by looking here):
http://en.wikipedia.org/wiki/Digital_Data_Storage#DDS-1
 
A tar tf /dev/rmt/3 failed - I guess the DDS-2 drive expects to find a DDS-2 tape in there, not a DDS-1. Maybe it would be happier if we told it to use a low-density type of tape?

You can tell the tape drive what density to use depending on which device
file you refer to - details here:
http://www.cyberciti.biz/tips/solaris-tape-device-names-and-control-the-tape-drive.html

To get Solaris to read from it as a low-density device: mt -f /dec/rmt/3l status

or tar xvf /dev/rmt/3l
And it works! 

January 10, 2012

Philip YarraThe Sparc ghetto

I recently obtained a Sun Fire V250 and an old Ultra 10 - some nice UltraSparc goodies to play with - yay!

Both are running Solaris 8, so of course, the first thing to do is spend some time getting some modern tools installed - SSH, Firefox. It looks like the old Blastwave team have split into two rival efforts - Blastwave and OpenCSW. OpenCSW looked a little simpler to get up and running so I went with that. Oh yeah, and of course, ditch NIS and use DNS.

The Ultra 10 is now dual-booting Solaris 8 and Debian for Sparc which I'm hoping will provide a native sparc buildhost for ReadyNAS binaries (since as noted earlier I had not much luck with cross-compiling!). I simply added another IDE hard drive, and from OpenBoot I either boot disk0 or boot disk1 depending on what flavour I feel like. There was one trick to getting the Debian installer working correctly, all cool after that. While it's not exactly fast, it's tolerable using WindowMaker for a desktop. I somehow think KDE or Gnome might be a bit too demanding for it though.

The Sun Fire V250 is rather different. It sounds like a light aircraft taxiing for take-off. This thing is noisy! However, it's also rather faster than the old Ultra 10. So far, it's just vanilla Solaris 8. However, since I pretty much don't wish to permanently reside in the Jurassic era, it's either going to need a newer Solaris, or some other operating system. I thought OpenIndiana might be worth a look-see, since it's the continuation of the now-murdered OpenSolaris project. Hmmm... no Sparc version available for download... what??? I mean, I know we all use x86 these days, but why no Sparc ISO images for what is essentially Solaris?

Seems the malady is wider-spread than I thought... can you download the latest Oracle VirtualBox binaries for Sparc? Why no, you cannot. x86 and amd64, for sure. You can get VirtualBox for Solaris 10 from Oracle. Still... odd, no?

Kinda feels like poor old Sparc users are in a ghetto :-(

December 31, 2011

Robert MibusOracle Java 6 & Ubuntu

This is semi-draft, as I haven't gotten around to testing the packages I build...

Caught out needing new "Sun" Java packages for Ubuntu, by the DLJ revocation?

Grab a usable set of build source packages from http://archive.canonical.com/ubuntu/pool/partner/s/sun-java6/ - you'll need an *.orig.tar.gz, a *.dsc, and a *.debian.tar.gz file for the version you've picked. I used a 6.26 version from Natty.

Grab a latest (currently 6u30) "bin" Linux packages for each architecture from http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html (Note: needs Javascript!).

dpkg-source -x *.dsc
cd sun-java6-6.26/
rm *bin
mv ~/Downloads/jdk-6u30-linux-i586.bin jdk-6u30-dlj-linux-i586.bin
mv ~/Downloads/jdk-6u30-linux-x64.bin jdk-6u30-dlj-linux-amd64.bin

Edit debian/rules, comment out the section following the comment 'check if the sources are the "same"'.

dch -v 6.30

(add in a stub changelog entry - this is just so it realises what version it's building)


cd ../sun-java6-6.30
dpkg-buildpackage -b -uc

Then you should be left with workable packages matching the last Ubuntu-released ones, but with a newer JRE/JDK.

Note #1: I haven't so much as installed these packages, it's just theory. It built, it ships - I mean, hey, it's New Year's Eve! ;-)
Note #2: This won't include a working web plugin - I pulled the build packages from after 6.26-1natty1, which was the last release with a working web plugin.

November 20, 2011

November 14, 2011

Gavin CarrOpenLDAP Tips and Tricks

Having spent too much of this week debugging problems around migrating ldap servers from RHEL5 to RHEL6, here are some miscellaneous notes to self:

  1. The service is named ldap on RHEL5, and slapd on RHEL6 e.g. you do service ldap start on RHEL5, but service slapd start on RHEL6

  2. On RHEL6, you want all of the following packages installed on your clients:

    yum install openldap-clients pam_ldap nss-pam-ldapd
    
  3. This seems to be the magic incantation that works for me (with real SSL certificates, though):

    authconfig --enableldap --enableldapauth \
      --ldapserver ldap.example.com \
      --ldapbasedn="dc=example,dc=com" \
      --update
    
  4. Be aware that there are multiple ldap configuration files involved now. All of the following end up with ldap config entries in them and need to be checked:

    • /etc/openldap/ldap.conf
    • /etc/pam_ldap.conf
    • /etc/nslcd.conf
    • /etc/sssd/sssd.conf

    Note too that /etc/openldap/ldap.conf uses uppercased directives (e.g. URI) that get lowercased in the other files (URI -> uri). Additionally, some directives are confusingly renamed as well - e.g. TLA_CACERT in /etc/openldap/ldap.conf becomes tla_cacertfile in most of the others. :-(

  5. If you want to do SSL or TLS, you should know that the default behaviour is for ldap clients to verify certificates, and give misleading bind errors if they can't validate them. This means:

    • if you're using self-signed certificates, add TLS_REQCERT allow to /etc/openldap/ldap.conf on your clients, which means allow certificates the clients can't validate

    • if you're using CA-signed certificates, and want to verify them, add your CA PEM certificate to a directory of your choice (e.g. /etc/openldap/certs, or /etc/pki/tls/certs, for instance), and point to it using TLA_CACERT in /etc/openldap/ldap.conf, and tla_cacertfile in /etc/ldap.conf.

  6. RHEL6 uses a new-fangled /etc/openldap/slapd.d directory for the old /etc/openldap/slapd.conf config data, and the RHEL6 Migration Guide tells you to how to convert from one to the other. But if you simply rename the default slapd.d directory, slapd will use the old-style slapd.conf file quite happily, which is much easier to read/modify/debug, at least while you're getting things working.

  7. If you run into problems on the server, there are lots of helpful utilities included with the openldap-servers package. Check out the manpages for slaptest(8), slapcat(8), slapacl(8), slapadd(8), etc.

Further reading:

November 11, 2011

Dave HallDrupal in the Enterprise (aka Vote for my DrupalCon Session)

TL; DR: [spam]Please vote for my DrupalCon Denver proposal on Drupal workflows in the enterprise.[/spam]

For the last few months I've been working for Technocrat on a new Drupal based site for the Insurance Australia Group's Direct Insurance brands. The current sites are using Autonomy Teamsite.

The basics of the build are relatively straight forward, around 1000 nodes, a bunch of views and a bit of glue to hold it all together. Where things get complicated is the workflow. The Financial services sector in Australia is subject to strict control of representations being made about products. The workflow system needs to ensure IAG complies with these requirements.

During the evaluation we found that generally Drupal workflows are based around publishing a single piece of content on the production site. In the IAG case a collection of nodes need to be published as a piece of work, along with a new block. These changes need to be reviewed by stakeholders and then deployed. This led us to build a job based workflow system.

We are using the Features module to handle all configuration, deploy for entities and some additional tools, including Symfony, Jenkins and drush to hold it all together.

I've proposed the session for Drupal Downunder in January and will refine the session based on feedback from there in preparation for Denver. If you want to learn more about Drupal Workflows in the Enterprise, please vote for my session.

November 05, 2011

JaseInformation Gluttony

Humans want more.  All the time more. It’s our nature.  In times long past, when your family/tribe killed a mammoth, you ate and ate for days until all the mammoth was gone and stored the excess energy as fat cos it would be another month before you saw anything more than nuts and berries again.  Good strategy in a world of scarcity and uncertain supply. A strong theory for the epidemic of obesity and diabetes in modern society suggests that an environment of plentiful energy supply does not divert our instinct to overconsume and store energy, so we will eat beyond our needs. We love starch and sugar as cheap carbs that our ancestors would have quickly used running away from bears and tigers, but which we take more than we can actually use, failing  to burn the kilojoules as we sit on our ever enlarging arses watching TV.

This instinct feeds the whole structure of commerce and capitalism.  In the same way that we don’t need another 1000kj today but still eat an evening snack, we have a hunger for new things that is obscene.  Many people will have retired a perfectly good iPhone 3 or 4 to get the iPhone 4S when it came out, which is a little faster, has better camera resolution (upgraded from more than you probably need for your limited photography skills, to even more than…) and umm yeah that’s about it.  But it’s new and more.  Walk past hard rubbish and you will virtually always see a CRT TV, which probably works, but isn’t flat panel HD so it’s no longer good enough for the kids’ bedrooms.  The sooner we want more, the faster the economy grows, and becomes dangerously fat and diabetic.

It’s reasonable to say that in my lifetime I will not spend more than two million dollars, yet Alan Joyce of Qantas strike breaking fame earns 5 million EVERY YEAR.  Perhaps his house is worth ten million dollars.  He could still pay it off in two years.  Where the hell is that money going?  It’s probably just piling up in his in tray at home like all the stuff you and I never get around to dealing with.  And he’s a low paid CEO. 5 mill a year is obscene, greedily taking far more than we could use, but not one of us would say no to it would we?

Which brings us to the internet and TV.  There is far more information than you could possibly absorb in an entire lifetime.  Wikipedia probably grows faster than you can read.  There are docos, news and current affairs to fill numerous 24 hour TV stations. And certainly reading and learning are good and useful things.  Just like you can’t get by without kilojoules and in a modern western world at least, gadgets, if you try to live without some reading and learning you will quickly become socially and functionally inept, not to mention turning into a redneck idiot. You need a certain amount of info to exist normally and healthily in society.

However there’s a point at which we are gluttonous with our information intake.   Watching said news when you can’t vote, influence, change, learn from the things you see is just consuming info you don’t need. I find myself refreshing websites to see if there is new stuff, reloading feeds and checking Facebook one more time.  When they run dry, I could write some lyrics/a song inspired by what I read; blog some thoughts about what I learned;  find friends to chat with online about things I’ve discovered; go to bed…  Instead, I’m thinking hmm, what can I search for that will provide another half hour or so of random reading.  Or at work Ooh there’s five minutes while this job runs, I’ll just read some feeds.  Or ahh it’s a bit late to play my guitar, I’ll just go and noodle on the internet for a bit…hey where did another evening go??  I  consumed a whole bunch of data that may have been interesting or even significant, but I ate so much of it that my brain got diabetic and didn’t process it properly, and it was far more than I needed to get through my day and I probably didn’t grow or learn and I likely won’t even remember half of it.  I should’ve eaten less and done more with it.

Tonight I obviously decided to create instead of consume – I took my recent experiences, a variety of things I had learned (consumed) before, processed them and compiled them into a new creation – this blog post. For a change I actually burned the mental energy from some things I had absorbed.  This post is the product of that mental energy I had consumed.  And now, assuming you got this far, you are the consumer of same.  And that’s great, your brain has had some healthy nutrition.  The question is…does it go into the pool of excess consumption and just make your head fat?  Or will you take what you ate here and burn it – doing, or making, or helping, or growing, or being?

November 01, 2011

Gavin CarrRHEL6 GDM Sessions Workaround

The GDM Greeter in RHEL6 seems to have lost the ability to select 'session types' (or window managers), which apparently means you're stuck using Gnome, even if you have other better options installed. One workaround is to install KDM instead, and set DISPLAYMANAGER=KDE in your /etc/sysconfig/desktop config, as KDM does still support selectable session types.

Since I've become a big fan of tiling window managers in general, and ion in particular, this was pretty annoying, so I wasted a few hours today working through the /etc/X11 scripts and figuring out how they hung together on RHEL6.

So for any other gnome-haters out there who don't want to have to go to KDM, here's a patch to /etc/X11/xinit/Xsession that ignores the default 'gnome-session' set by GDM, which allows proper window manager selection either by user .xsession or .Xclients files, or by the /etc/sysconfig/desktop DISPLAY setting.

diff --git a/xinit/Xsession b/xinit/Xsession
index e12e0ee..ab94d28 100755
--- a/xinit/Xsession
+++ b/xinit/Xsession
@@ -30,6 +30,14 @@ SWITCHDESKPATH=/usr/share/switchdesk
 # Xsession and xinitrc scripts which has been factored out to avoid duplication
 . /etc/X11/xinit/xinitrc-common

+# RHEL6 GDM doesn't seem to support selectable sessions, and always requests a
+# gnome-session. So we unset this default here, to allow things like user
+# .xsession or .Xclients files to be checked, and /etc/sysconfig/desktop
+# settings (via /etc/X11/xinit/Xclients) honoured.
+if [ -n "$GDMSESSION" -a $# -eq 1 -a "$1" = gnome-session ]; then
+  shift
+fi
+
 # This Xsession.d implementation, is intended to obsolte and replace the
 # various mechanisms present in the 'case' statement which follows, and to
 # eventually be able to easily remove all hard coded window manager specific

Apply as root:

cd /etc/X11
patch -p1 < /tmp/xsession.patch

October 28, 2011

JaseEnough is….never enough!!!

Warning to the faint of heart. There’s a couple of rude words near the bottom of this, but they are artistically justified I swear.  Hehe, swear.

A few years ago a friend told me he was doing Febfast. Good idea I thought – most years I give up alcohol for Lent, which is a great Lenten observance – as well as the old fashioned ‘giving something up’, it’s a good head clearing exercise. Febfast has the advantage of being a lot shorter – for the secular giving up for a calendar month, you choose the shortest month. Another great idea! Also it is a fundraiser to support organisations that help young people with alcohol and other drug problems.

Then I heard of Dry July, and I thought yeah well, you have a good idea and someone else will hijack it, at least it rhymes that’s kind of neat.  They support adults living with cancer, which is a useful thing – you can’t help but think most cancer related fundraising will result in patented medications and big profits for someone, so a charity that fundraises for hospitals providing day to day support isn’t too bad.

A local junior footy club did ‘Give it a Flick for Auskick’ which raised discussion about the appropriateness of alcohol related fundraising for junior sports.  I can see both sides of that argument, can’t make a judgement there.

And then on Facebook the other day, someone mentioned Ocsober.  And I thought, ‘great, another one.’  And then I thought, ‘hehe Ocsober, funny.’  And THEN, I thought, ‘no! Enough is enough!’  February, July ,October…that’s a quarter of the year already…it’s the thin end of the wedge I tell you. It will be all year before you know it.  I’m starting to think it’s a conspiracy of the old fashioned Christian right, to slowly squeeze out of our society the last relief we have from the gaping hole left by all the colour they squeezed out of the rest of life.  If the Puritans have their way, next will be ‘March’ on the Bottle-O, ‘May’ ye all be Temperate or worst of all, Nobeervember.

Luckily for you, dear readers, Neuromesh has your calendar covered.  It’s time to strike a blow against those who would repress this wondrous molecule.  Intoxication wants to be free!  Sure we could aim against the incursions that have already been made on our God given tipple,  and claim our rights in February, June and October, but I believe we should always get the first shout in be proactive, not just countering those months but claiming the whole year for freedom and inebriation.  With this in mind, allow me to present to you….the Alcohalander!

Wineuary

Your liver is well conditioned by the Christmas festivities, so why not put all that work to good use!  It’s important to make the most of the Australian summer, it’s hot and thirsty and you’ve had a good leadup from Christmas.  But maybe you are a bit fat from all the Christmas beer, so get your friends to sponsor you for each bottle of wine you get through in January.  Chardy, Cab Sav or Bubbly, every glass you have can help someone in need.

Fundraising for: families who spent too much on X-Boxes for their kids at Christmas and have an unmanageable credit card debt.

Febrewary

It’s home brew month. Reaching the end of Summer spending, with a big year still ahead of you, it’s an ideal time to stash away a few bucks by drinking on the cheap.  Also the warm Australian weather makes for fast fermenting temperatures, so you should be able to get four ‘home projects’ completed in February.  While you wait for your brew to settle, drink whatever you like.

Fundraising for: Community garden projects, especially if they grow hops and barley

March to the Pub

Occupy Wall Street, Occupy London,  Occupy Melbourne…Occupy the local we say!  Take your liver and your stomach out for a treat – get your friends, family and workmates to sponsor you for every Pot/Schooner + Chicken Parma meal you consume at the pub during March!

Fundraising for: Chicken Welfare 

Graperil

Spent too much at the pub in March?  Time to resort to Chateau Cardboard.  The humble goony is the drink of fundraising choice for April.  Strike back at your year ten English teacher and say No!  Quantity is a great substitute for quality!  Remember to tell your sponsors whether you will be drinking the two, four or the mighty five litre cask!

Fundraising For: Recycling awareness, but if you can’t find any sponsors, put your empty goony box in the recycling instead of throwing it in the garden of the local primary school, and we’ll call it even.

May Part-ayyy

What comes before Part B?  Part Ayyyy!!! It’s the end of autumn and of sunshine.  The sun is down earlier and the night is longer, and the longer the night, the longer the party.  This month, your sponsors will be raising funds based on every nighttime hour you can spend drunk, so party for a cause!

Fundraising For: Insomnia research

Brewn

Chances are you completely forgot about the home brew you made in Febrewary, so it’s time to tidy up the garage and drink that.  Of course, unless your friends drink as much as you they’ll probably remember that they already sponsored you for these home brewed charitable efforts, so it’s a good time to enlist some new sponsors for your community service work in Brewn.  Plus you’ll have twice as many potential sponsors to hit up next month!

Fundraising for: Alzheimers research

Try July

It’s cold, it’s wet….stick to the warmth of your home and experiment. Try July is all about new things.  Go to the grog shop  and say “One of each thanks”, mix and match and see what works.  You’ll be making money for charity each time you try a new cocktail, plus you can win prizes for the most suggestive new cocktail names! Imagine the fun when you offer your friends an  ’Energetic Eel Enema’?

Fundraising for: Diversity thing

Auguzzle

Crank it up, it’s all about the numbers in Auguzzle. It’s cold and dark, but hey have a few and a few more and you don’t mind. What’s the drunkest you’ve ever been mate, haha, you have 31 days to acheive it.

Fundraising for: I dunno, probably stomach ulcers or something.

Pisstember

Yeah what’s more Australian than gettin’ on the piss yeah?  Get a few friends, and it’s your shout, and his shout and the other guys shout, as long as you don’t leave just when it’s your shout yeah!

Fundraising for:  more beers!!!

Octoberfest

Maulticutural and stuff it;s German so its’qw good they invented beer right?  Also, girls in them oktoberfest outfits and big beers and like lids on and that.

Fundraising for: scheiße hehe I swore in German

Noremember

I was gonna type something or…something, it was a, like, it was fu, it was fu…fuckin…hey, it’s been….mate…I love you mate, your fuckin….you know….

Fundraising for : Kebabs

Bleghcember

Yeah I used to, you know…and it’s fugn…I gotta….wait…be right back….

Fundraising for: Taxi fare

October 18, 2011

Gavin Carrrpm-find-changes

rpm-find-changes is a little script I wrote a while ago for rpm-based systems (RedHat, CentOS, Mandriva, etc.). It finds files in a filesystem tree that are not owned by any rpm package (orphans), or are modified from the version distributed with their rpm. In other words, any file that has been introduced or changed from it's distributed version.

It's intended to help identify candidates for backup, or just for tracking interesting changes. I run it nightly on /etc on most of my machines, producing a list of files that I copy off the machine (using another tool, which I'll blog about later) and store in a git repository.

I've also used it for tracking changes to critical configuration trees across multiple machines, to make sure everything is kept in sync, and to be able to track changes over time.

Available on github: https://github.com/gavincarr/rpm-find-changes

October 01, 2011

JaseThe Talking Clock

This is wonderful – a ‘film’ from when the first automated talking clock was installed in Australia in 1954, by the Post Office because Telecom didn’t even exist then. Prior to that, a human sat at the desk and literally read the time, over and over and over. And you think you hate your job. It goes for four minutes, well worth it to see the classic video, and also shows how the system was a literal clockwork mechanism that played off three discs.

<iframe allowfullscreen="allowfullscreen" frameborder="0" height="315" src="http://www.youtube.com/embed/fp4zlMZVcmM" width="420"></iframe>

I was inspired to look for this by wondering how the talking clock system managed daylight savings. Is there someone whose sole job is to manage the talking clock? What does s/he do, just come in twice a year to shift it back and forth at daylight savings?

The above system managed it because two systems were actually installed, one live and the second ran constantly as a hot spare. When it came to daylight savings, the secondary was manually advanced, and a technician would cut over to that at the crucial moment. The first machine would then be advanced and it would become the hot spare, and the process was reversed at the end of daylight savings. It was some quality engineering, designed to run constantly, which it did for 36 years.

The glass disc mechanical system with the BBC style Received Pronunciation accent was replaced in 1990 by a digital one recorded by Adelaide ABC broadcaster Richard Peach. He passed away in 2008 so possibly the talking clock should contain a warning to indigenous cultures that it contains the voice of someone who has died. This system probably just cuts over automatically. Whenever you replace something wonderfully clever with something merely computerised, a little bit of the magic goes out of the world. Telecom commemorated this fact by making a video twice as long and far less interesting.

<object height="375" width="500"><param name="movie" value="http://www.youtube.com/v/9LVzKHOodC4?version=3"/><param name="allowFullScreen" value="true"/><param name="allowscriptaccess" value="always"/><embed allowfullscreen="true" allowscriptaccess="always" height="375" src="http://www.youtube.com/v/9LVzKHOodC4?version=3" type="application/x-shockwave-flash" width="500"></embed></object>

September 26, 2011

Mark UnwinOAv2 beta3 released


Go grab it.
To upgrade your database (for an existing beta1 or beta2 install), copy the OAv2 files over the old ones, then fire up OAv2 and go to Help -> about (as an Admin).
Then click the red upgrade text. Done.

Make sure you use the new audit script, too.

FWIW - I would backup your database before doing this and also copy your original OAv2 files somewhere else. That way, if the worst happens, you can always revert back...

Please submit some statistics (Help -> Statistics) so I have some idea of how many people are using OAv2 (and how many systems they are auditing with it). This submission cannot be linked back to your organisation.

Also - I am off camping with the family from tomorrow night (Tue, Brisbane time). I will have limited internet access and no access to debug issue's. I will check the forums, but fixes won't be forthcoming until next week. Apologies if this causes an inconvenience.


Mark UnwinAlpha 7 is out

Printers and Monitors now audited.
Many bugs squashed.
Get it now !

http://launchpad.net/oav2/trunk/alpha7/+download/OAv2.zip

September 25, 2011

John SleeArduino: combining CAN-bus and Xbee shields


A little box of Arduino, originally uploaded by indigoid.

So I created a simple little sketch, based on the TimeGPS sample that comes with the TinyGPS library, that waits for a "p" over the Xbee interface and upon receiving it, sends back the date, time, latitude and longitude data from the GPS. The CAN-bus shield uses pins 4 and 5 for the GPS serial interface. I found that the Xbee modules I have (as supplied in the SparkFun Xbee retail kit) have rather shorter range than I'd hoped for, but at least they work and I am learning about their usage. Here's the sketch:


#include <TinyGPS.h>        //http://arduiniana.org/libraries/TinyGPS/
#include <NewSoftSerial.h> //http://arduiniana.org/libraries/newsoftserial/
// GPS and NewSoftSerial libraries are the work of Mikal Hart

TinyGPS gps;
NewSoftSerial serial_gps = NewSoftSerial(4, 5); // receive on pin 3

void setup()
{
Serial.begin(9600);
serial_gps.begin(4800);
Serial.println("setup...");
}

void dump_lat_long(float flat, float flong) {
Serial.print("lat : "); Serial.println(flat);
Serial.print("long: "); Serial.println(flong);
}

#define pdec(x) { Serial.print(x,DEC); }
#define p(x) { Serial.print(x); }
#define s() p(" ")
#define d() p("-")
#define c() p(":")
void dump_datetime() {
int year;
byte month, day, hour, minutes, second, hundredths;
unsigned long fix_age;
gps.crack_datetime(&year, &month, &day, &hour, &minutes, &second, &hundredths, &fix_age);
pdec(year); d(); pdec(month); d(); pdec(day);
s();
pdec(hour); c(); pdec(minutes); c(); pdec(second); p("."); pdec(hundredths);
Serial.println();
}

void loop() {
float flat, flon;
unsigned long fix_age;
String msg;
byte havedata = 1;
byte polled = 0;
while (serial_gps.available() && !polled) {
if(gps.encode(serial_gps.read())) {
// returns +- latitude/longitude in degrees
gps.f_get_position(&flat, &flon, &fix_age);
if (fix_age == TinyGPS::GPS_INVALID_AGE) {
msg = "No fix detected";
havedata = 0;
} else if (fix_age > 5000)
msg = "Warning: possible stale data!";
else
msg = "Data is current.";
polled = 1;
if (Serial.available() && Serial.read() == 'p') {
Serial.println(msg);
if (havedata) {
dump_datetime();
dump_lat_long(flat,flon);
}
delay(100);
}
}
}
}

I also wrote a small Perl script that (via Device::SerialPort from CPAN) interrogates the Arduino every 5 seconds or so, using a USB-attached Xbee Explorer. For Linux you will need to change the serial port device filename to /dev/ttyS0 or similar. No idea about Windows, sorry. Again, I started out with some sample code (this time from the Device::SerialPort distribution) and hacked most of it off. Code follows:


#!/usr/bin/perl

use strict;
use warnings;
use Device::SerialPort;

my $file = "/dev/tty.usbserial-A700fbpg";
my $ob = Device::SerialPort->new ($file) || die "Can't open $file: $!";

$ob->baudrate(9600) || die "fail setting baudrate";
$ob->parity("none") || die "fail setting parity";
$ob->databits(8) || die "fail setting databits";
$ob->stopbits(1) || die "fail setting stopbits";
$ob->handshake("none") || die "fail setting handshake";
$ob->write_settings || die "no settings";
$ob->error_msg(1); # use built-in error messages
$ob->user_msg(1);

while(1) {
$ob->write("p");
print $ob->input;
sleep 5;
}

John SleeAnd if your Xbee shield is behaving strangely...

If you are combining the CAN-Bus and Xbee shields from SparkFun, it can be very tempting to plonk the EM406 GPS atop the nice flat prototyping area on the Xbee shield. It's a good fit there! But if stuff suddenly and inexplicably stops working, check that the GPS chassis isn't bridging the terminals on the Xbee shield's RESET switch. I felt like a real idiot :-(

September 12, 2011

John Sleestairwell sensor light: Arduino!

So I wanted a small light at the bottom of the short set of stairs that lead from the door of my apartment into the main living area. I've been learning about Arduino lately, so I figured this might be a practical experiment. I decided to use a reed switch to sense when the door had been opened.

After getting frustrated at the reed switch functioning just fine when closed (Arduino digitalRead() returning HIGH) but bouncing around randomly when it should have been staying open, I did some Googling and found that I should have used a pullup resistor to coax the current in the right direction. I don't pretend to understand why this works, but I intend to find out.

Anyway, I used a circuit based very much on this one, plus of course an RGB LED to do the actual lighting. The next step is to grab a couple more RGB LEDs (I only had one on hand that had been supplied in the Sparkfun Inventors Kit) and make it brighter.

Learning about and experimenting with Arduino has been a lot of fun so far. Am working on a larger project for the bike. Along the way I've dramatically improved my soldering skills, though they are still pretty terrible!


#include <Time.h>

// pins
const int reedswitch = 2;
const int red = 9;
const int green = 10;
const int blue = 11;

// door states
const int DOOR_OPEN = 0;
const int DOOR_CLOSED = 1;

// minimum time the courtesy light will stay on for (seconds)
const int MIN_OPENTIME = 10;

///////////////////////////////////////////

int door = DOOR_CLOSED;
int last_open_at = 0;

void setup() {
pinMode(reedswitch, INPUT);
setTime(0);
}

void rgbled(int r, int g, int b) {
analogWrite(red,r);
analogWrite(green,g);
analogWrite(blue,b);
}

void loop() {
int reedswitch_state = digitalRead(reedswitch);
if (reedswitch_state == HIGH && now() >= last_open_at + MIN_OPENTIME) {
door = DOOR_CLOSED;
} else if (reedswitch_state == LOW) {
last_open_at = now();
door = DOOR_OPEN;
} else {
// no change in state, do nothing
}
if (door == DOOR_OPEN) {
rgbled(255,255,255);
} else {
rgbled(0,0,0);
}
delay(500);
}

September 09, 2011

JaseNew song, I Defy

Did you think I was dead?  No I’ve just been busy playing my guitar.  I have several songs on the boil at the moment, but this one is complete.  It has random 5/4 timings and a four part guitar harmony bit.  Also, it’s strong and grrr yeah!  Listen to I Defy

Robert MibusLinux.Conf.Au – +1!

Just got this email...:

We're pleased to announce that your proposal(s) has/have been ACCEPTED for LCA2012.

<SNIP>

---
 IPv6 Dynamic Reverse Mapping - the magic, misery and mayhem
---

So - wow! I'll see you there :)

September 07, 2011

Edwin GroothuisiPhone dock bar

The iPhone home screen has four icons stuck at the bottom of the screen. For the last year I had there Safari, Mail, Phone and Facebook.

Yesterday I swapped Facebook for Podcaster, which I have been using more frequent in the last four months.

Facebook is for people who are bored.
Podcasts are for people who want to learn!

August 08, 2011

Gavin CarrGoogle Hangout on CentOS 6

Kudos to Google for providing linux plugins for their Google Plus Hangouts (a multi-way video chat system), for both debian-based and rpm-based systems. The library requirements don't seem to be documented anywhere though, so here's the magic incantation required for installation on CentOS6 x86_64:

yum install libstdc++.i686 gtk2.i686 \
  libXrandr.i686 libXcomposite.i686 libXfixes.i686 \
  pulseaudio-libs.i686 alsa-lib.i686

August 04, 2011

Edwin GroothuisMorrison Gedicht - Twee

ik wou dat ik een oma had
die ik soms zomaar op mocht bellen
en die 's avonds bij m'n bedje zat
om mij een sprookje te vertellen

maar oma's hebben allemaal al iemand
voor wie ze oma kunnen zijn
ze zitten dan wel in tehuizen
maar elke zondag is het kamertje te klein

dan komen ze allemaal op visite
en vragen of ze een zwaantje vouwt
en als ze 's avonds moe gaat slapen
weet ze dat er iemand is die van haar houdt

hoe zou het dan toch komen
dat heel veel oma's eenzaam zijn
en van hun kleine kinderen dromen
die nu veel groter en verhinderd zijn

al die oma's die truien breien
waarvan niemand zegt: wat fijn!
die hoeven me dat truitje niet te geven
maar willen ze alstjeblieft mijn oma zijn?

Morrison

Edwin GroothuisMorrison Gedicht - Een

het is al bijna avond
wat gaat zo'n dag toch gauw
ik klim zo in mijn bedje
en dan
denk ik weer aan jou

dan lig ik stil te luisteren
naar de geluiden om me heen
dan hoor ik
zoemen tikken fluisteren
want ik lig hier niet alleen!

soms vertel ik mijn avonturen
aan Tiberius
da's een bromvlieg
en die woont op het kozijn
dan snort ie heel tevreden
want als er iemand tegen 'm praat
dat vindt Tiberius hartstikke fijn

vandaag ook Ricky nog gesproken
die woont bij de kersenboom
het is een soort van rups
maar hij wil later vlinder worden
net als zijn vader en moeder
en zijn tante en z'n oom

zelf wil ik
als ik later groot word
proberen klein te blijven
omdat Tiberius en Ricky anders
bang voor me zijn

dan blijf ik ook dichter bij
de bloemen
en zal ik altijd
gelukkig zijn

Morrison

June 20, 2011

JaseIdentity

Like another 70 million or so people, my personal details were probably compromised in the Great Playstation Hack of 2011. This has probably left me open to IDENTITY THEFT.  ZOMG ZOMG call Today Tonight, blah blah whatever.  So far the total cost to me has been: I got two free games and an animated dragon on my Playstation login screen.  No wait that was the gain, the loss was umm…

Woot! Free Stuff!

Now this doesn’t exonerate Sony for failing to properly secure the credit card details I gave them.  I dunno if these are even at risk, various articles say various things but ultimately credit card companies cover fraud pretty well and Mon keeps a good eye on finances so she’d notice if I bought a television in Bolivia or subscribed to LichtensteinGayPorn.com or whatever so I’m less worried about that than other people may be.

What do you think? Do we get Xbox or PS3?

The real danger is allegedly what they call identity theft.  This is where you get hold of enough details about a person to start doing financial things in their name.  I don’t even remember what I have told PSN about me. Probably name and address, email address, umm maybe my mother’s maiden name or something?  That’s enough to start finding out lots about me I’m sure and maybe even to create debt in my name. This has happened to a close friend some years back, entirely unrelated to any known hack, so it’s possibly doable with reasonably public details and some social hacking skills.

But is this my identity?  Obviously it’s a serious issue on an economic level, but if it happened it wouldn’t mean the theft of my identity. Like if you steal my laptop, now I don’t have a laptop and that is pretty annoying, and it will cost me to replace it.  But if you steal my identity, what have you taken from me? I’m still me. Would I insult my friends, alienate my workplace, annoy my wife even more than usual, pawn my guitars or parent my children differently? Would I, after the loss of my identity, wake up one morning and barrack for Collingwood, or vote for the CDP?  Could anyone, with any of the details on the internet, even what I have posted on this blog, take away the essence of what makes me me?

Maybe...

I guess it depends on how you define your identity.  With these details, you could steal my money.  You could potentially wreck my career.  For many, I guess that is what they define themselves by, so maybe you could actually take away some part of their identity.  But me?  You could take those things without removing anything that is essentially Jase.

June 17, 2011

Alex JurkiewiczNon-interactive database migration of Kayako 3 to 4

The Kayako 3 -> 4 upgrade process is a little convoluted. You have to install a fresh copy of 4, then run a script to import your Kayako 3 data. For large installs you need to run the script multiple times to fully migrate your database, which is a problem because the script interactively asks for your database credentials every time it's run. You don't really want to babysit the multi-hour migration process do you? Fear not, just patch the code:

--- __swift/modules/base/console/class.Controller_Import.php.orig    2011-06-16 12:09:40.000000000 +1000
+++ __swift/modules/base/console/class.Controller_Import.php    2011-06-16 12:11:06.000000000 +1000
@@ -75,12 +75,12 @@
        $this->Console->WriteLine('====================', false, SWIFT_Console::COLOR_GREEN);
        $this->Console->WriteLine();
 
-       $_databaseHost = $this->Console->Prompt('Database Host:');
-       $_databaseName = $this->Console->Prompt('Database Name:');
-       $_databasePort = $this->Console->Prompt('Database Port (enter for default port):');
-       $_databaseSocket = $this->Console->Prompt('Database Socket (enter for default socket):');
-       $_databaseUsername = $this->Console->Prompt('Database Username:');
-       $_databasePassword = $this->Console->Prompt('Database Password:');
+       $_databaseHost = 'localhost';
+       $_databaseName = 'kayako3database';
+       $_databasePort = '3306';
+       $_databaseSocket = '';
+       $_databaseUsername = 'kayako3user';
+       $_databasePassword = 'sekret';
 
        if (empty($_databasePort))
        {

This post brought to you by too long spent trying to automate this with an expect script, before discovery of the fact Kayako don't encode all their PHP.

June 15, 2011

Edwin GroothuisMy mallet finger - Wednesday 15 June 2011

Last week it was decided that my mallet finger had to be fixed via an operation during which I will get two wires inserted into my finger: One below the nail which will push the broken piece back against the bone, and one through the upper bone and halfway the middle bone so that bone doesn't move anymore.

Today was the big day. We had to be in the hospital at 08:30, which is about half an hour before Dirkie and Hanorah go to school. So they slept with their grandparents and were very excited about the fact that they got breakfast in a plastic bag in the car on their way to school. I wish everybody was so easily pleaseble.

When you made the appointment to go to the hospital, you know from the moment you enter the building you have lost control over your life until you leave you are on somebody elses schedule. It will involve a lot of waiting, and there is nothing you can do about it:

  • Waiting at reception to go to the waiting area for day surgery.
  • Waiting at the waiting area for day surgery to go to the beds at day surgery.
  • Waiting at the beds at day surgery to go to the pre-operation room.
  • Waiting at the pre-operation room to go to the operation waiting room.
  • Waiting at the operation waiting room to go into the operation room.
  • No waiting here, because this operation room is expensive!
  • Waiting at the operation room to go into the recovery room.
  • Waiting at the recovery room to go to the day surgery.
  • Waiting at the day surgery to get out.

Before you get in the operation room, you will be asked the same question every time: Your name, date of birth, name of the doctor and what they are going to do on you. Just to make sure they have the right guy in front of them.

The procedure done on my finger was over in 20 minutes. The anastetic I got was a finger block, two needles in my hand which neutralized all feeling in the ring finger, and some drowsiness stuff which I think didn't really work at all. During the operation I could hear the drill, but not feel the things they did on my finger.

At 14:30, after the operation and when I was out of bed, I was given an arm sling to keep my hand up and a prescription for painkillers. Six hours real-time for a 20 minutes procedure, it's very low duty-cycle.

The finger itself now has a splint at the top of the hand and a lot of bandage around it. You can see the wire sticking out at the top of my finger, which is right now not scary yet...

I was told to take the painkillers when my fingers started to tingle, which was a couple of hours later. Since the pain didn't come back after that, I didn't take anymore and slept through the night.

So is there pain? Yes and no.

There is irritated skin (for lack of a better description) around where the wires are sticking out. But there is no pain because of the drilling, which can be either because there is no pain or because the nerves in my pink and ring finger there are numb: For the last four years I haven't had any feeling in them. I have seen a specialist for it who has done the famous frog tests which will pull your muscles when an electrical current is going through them and they didn't find anything wrong with the nerves there.

Maybe that has gotten me through the night without painkillers, maybe there was no pain to start with...

On Monday I have my first physiotherapy at 08:00.

June 09, 2011

Edwin GroothuisMy mallet finger - Thursday 9 June 2011

We went to see the hand-surgeon. From the X-rays he saw that the break was at a nasty location: it was broken of in the contact area of the joint. First a proper cast instead if the splint and then new X-rays in case the piece of bone was put back in place by the cast: it wasn't.

So the next options were: leave it like this and it will be half-fine or have an operation and it will be fully fine. There are two kind of operations which he could do: a screw with which the broken piece get puts back or a two-wire approach with which the broken piece gets pushed against the bone and regrows that way. Because of the size of the piece broken off we chose for the wire.

After the operation I will have two pieces of wire sticking out of my finger for four to six weeks, but they are luckily under a dressing, and have a cask for that period too. After that everything should be back in volleyball-playing-condition again!

Next update: Coming Wednesday most likely.

May 18, 2011

Alex JurkiewiczBackslash in username or CWD breaks Bash prompt in Centos

Something I just ran in to. If your username or current directory has an escape code in it (say, because your username is from Active Directory like "DOMAIN\alex.jurkiewicz"), the default Bash shell on Centos 5 has problems. Depending on the escape code you might get a broken prompt or even no terminal output at all!

The problem is that PROMPT_COMMAND set in /etc/bashrc is set to interpret escape codes in the username and current directory:

PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'

PROMPT_COMMAND is run each time before the prompt is printed. Here it is used to set the xterm or GNU screen window title.

There are two ways to fix this:

  1. Add 'unset PROMPT_COMMAND' to your .bashrc. This will stop your xterm / screen title from being updated but is a simple fix.
  2. Set PROMPT_COMMAND properly using override files in /etc/sysconfig, so $USER and $PWD are echoed literally without escape code interpretation. Create the following two files with +x permissions:

/etc/sysconfig/bash-prompt-xterm:

# Duplicate of default PROMPT_COMMAND, but using a single command to stop race conditions and without escape code interpretation for USER, HOSTNAME and PWD
printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"

/etc/sysconfig/bash-prompt-screen:

# Duplicate of default PROMPT_COMMAND, but using a single command to stop race conditions and without escape code interpretation for USER, HOSTNAME and PWD
printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"

(The printf statement was taken from this RH bug.)

Logging out and back in again should result in a fixed terminal.

May 16, 2011

Dave HallDrush Make and Module Dependencies

Drush make is a wonderful tool for constructing Drupal platforms. A lot of Drupal developers are used to adding a list of modules, a few libraries and theme or 2 then running drush make to build their platform. It all seems pretty easy. What if I told you module developers could make things even easier for site builders?

Some contrib modules depend on third party libraries, and due to various reasons they can't always be stored in git repositories on drupal.org and included in the module release. To solve this problem module developers can include a .make file for their module. Drush recursively processes make files, so the module make file would be processed once found by drush make.

A good example of where this could be useful is the SMTP module, which depends on the LGPL licensed PHPMailer library. The module also requires a patch to be applied to the library, which drush make can apply for us. The following .make file could be included in the SMTP module as smtp.make:

core = 6.x
api = 2

libraries[phpmailer][download][type] = "get"
libraries[phpmailer][download][url] = "http://downloads.sourceforge.net/project/phpmailer/phpmailer%20for%20php5_6/Previous%20Versions/2.2.1/phpMailer_v2.2.1_.tar.gz"
libraries[phpmailer][download][md5] = "0bf75c1bcef8bde6adbebcdc69f1a02d"
libraries[phpmailer][directory_name] = "phpmailer"
libraries[phpmailer][destination] = "modules/contrib/smtp"

libraries[phpmailer][patch][drupal-compatibility][url] = "http://drupalcode.org/project/smtp.git/blob_plain/2acaba97adcad7304c22624ceeb009d358b596e3:/class.phpmailer.php.2.2.1.patch"
libraries[phpmailer][patch][drupal-compatibility][md5] = "2d82de03b1a4b60f3b69cc20fae61b76"

Now when the SMTP module is included a normal drush make file it will be downloaded, the PHPMailer library will be downloaded and patched ready for use.

Unfortunately there are some limitations to this approach. Firstly it assumes that the SMTP module will be installed under the modules/contrib directory, which is accepted best practice, but may not suit everyone's needs. When I tested this with the current stable version of drush make (6.x-2.2) it failed, and drush make 6.x-3.x from git needed to be patched. Hopefully a fix for this can be backported to the 6.x-2.x branch and included in a future release.

Update: I have posted the make file for the SMTP module as patch in issue #1159080.

April 02, 2011

Dave HallFixing Zimbra's Broken debs

As much as I love Zimbra, I find their Debian packaging frustrating. Why do they insist on shipping half broken debs? I can excuse vmware for being too lazy to provide proper descriptions for their packages, although the generic "Best email money can buy" text seems a little lame. Failing to populate the "Provides" field is brain dead. This makes it possible to install mailx on a server running Zimbra without installing another MTA.

I've created a simple workaround deb which provides mail-transport-agent and depends on zimbra-mta. The deb also symlinks the zimbra sendmail binary to /usr/sbin/sendmail - where it belongs. Now mailx and other tools which depend on mail-transport-agent can be installed. The package should work with both Debian and Ubuntu.

The source available on github, or you can download a prebuilt platform independent deb from github's download manager. The package is released under the terms of the WTFPLv2.

I hope that Zimbra builds better debs and makes this package obsolete.

February 05, 2011

Dave HallHelp a Drupal Geek Earn his Way to DrupalCon Chicago

I really want to attend DrupalCon Chicago, which kicks off in just over 4 weeks. The problem is that since DrupalCon Copenhagen business has been pretty quiet and so I find that I can't really afford to fund it myself. After deciding I had to be in Chicago I got creative about how to make it happen. The buy a line project was born.

Instead of just asking people to kick in some cash to get me to Chicago, I felt it was only right to earn my keep. People can buy a line of code, or sentence of documentation for Drupal. All code and docs created will be contributed to drupal.org. Buyers are free to specify where the lines are to be contributed, or leave me to decide. I'm looking forward to writing some of the lines on the Drupal Bus.

Recently I have been working on porting the UUID module to Drupal 7. I hope to get this module into Drupal 8 core. To make this happen I have to be in Chicago! Improvements to UUID will mean that content can be packaged up and moved around like configuration can be using the Features module.

All buy a line issues will be tagged so people can watch my progress. The first lines of code have been contributed to the getID3() module, so Drupal Commons can be installed by Aegir.

Thanks to everyone who has contributed so far. I have almost covered the DrupalCon ticket I bought from the Gizra team.

Please consider buying a line (or more) to help get this Drupal geek to Chicago. This is a great way of getting a module ported to Drupal 7, better documentation or even just a bug fixed. I have a decent track record of contributing to the project.

When deciding how many lines to buy, think about this - if I don't make it to Chicago, who will lock themselves out of their hotel room at 4am - naked!

January 26, 2011

Dave HallLooking Back at Drupal Downunder

I spent the weekend at Drupal Downunder in Brisbane. The venue was excellent. I'm a fan of not using "traditional" venues for conferences, to help make them even more memorable for attendees.

I managed to catch up with a bunch of people. The relaxed feel about the event was great. Most conferences I've attended recently have either been large or I've helped organise them, this time I could relax and enjoy.

On the Saturday I presented Building Distributions with Drupal 7, which had a small turn out as I was up against Josh Koenig and his Pantheon presentation. My presentation was hampered by lack of internet connectivity, but I think it went well. I used Lego, Duplo and Quatro blocks to demonstrate the evolution of Drupal distros.

Saturday night involved a pub crawl with various DDU and LCA folks. The highlight of the crawl was the Mana Bar, which is a gamers bar, that has a good collection of retro consoles and games on display.

I spent a fair bit of Sunday in the hallway track. I discussed the D7 port of UUID with Dries, which helped confirm the direction I was heading with it. Several people wanted to discuss my $100 Drupal site blog series. I also gave my Horizontally Scaling Drupal presentation, which was very well attended. Unfortunately due to people torrenting there was no usable internet access for my presentation. I had to skip the post event BBQ so I could fly back to Melbourne.

The lack of mobile signal and wifi made it frustrating to prepare and present. I would have liked to have seen an inclusive social event organised on the Saturday night. Overall I really enjoyed DDU and the organisers are to be congratulated. The vegetarian food options were excellent.

Thanks for Four Kitchens for funding me to get to DDU. I have just started contracting with them, so I really appreciated them covering my trip.

January 10, 2011

Matt BottrellA fathers poem to his unborn child

I sit down now to pen this note,
Of how I feel, and of love denote.
For in a few weeks you shall appear,
A fulfilment of love sincere.

I look forward to cradling you in my arm,
Able to protect you from any harm.
A tender kiss and soothing word,
A gentle stroke, nurtured.

As you grow from baby to child,
Learning from experiences you have compiled.
Always remember I am close by,
A guiding hand you can rely.

I look forward to many an embrace,
My arms open when you need their place.
My knee is yours for a horsey ride,
My ears listening to your story side.

As you migrate from child to adult,
Remember I am here to consult,
I promise to be there until I die,
For you are the apple of my eye.

January 04, 2011

Robert MibusHow not to screw up DNS

DNS is a wonderful distributed system, with plenty of safeguards and fallbacks to ensure continuous operation.

But still, screwups happen. Here's some tips on what to do to try to ensure you aren't caught out in the cold.

Tip 1: Have multiple servers.

Without a doubt, this is the biggest tip about DNS. Designed in from the beginning was an assumption that you'd have multiple nameservers for a given zone. So... have them!

Put them as far apart as you reasonably can - different hosts, different networks, different power. The more they share, the more risk you're in.

Countertip: Hosting your DNS server only over your ADSL link.

Tip 2: Do backups.

Pretty standard sysadmin fare. RAID isn't a backup, and neither is a slaved nameserver.

Tip 3: Nameservers must all agree.

You know how kids will sometimes ask their parents the same question independently, hoping for a different answer? It's important that the parents always give the same answer, and it's downright vital that your nameservers do too. Don't let them get out of sync!

Typically, zone transfers fix all your woes here, but do make sure they're working.

Tip 4: Test your changes directly against all nameservers.

It's just a small change, right? What could go wrong? Lots! So test each server individually. If one doesn't update, maybe you have a problem that you need to fix. (Or maybe it's just a bit laggy - it happens). "dig" is your friend.

Countertip: Not realising until too late that you're breaking Tip 3

Tip 5: Make your NS records match your glue.

If you've told your domain registrar that your nameservers are ns1.example.org and ns2.example.org, then make sure you put that in your zone file too - all sorts of wacky caching issues can ensue when you don't.

Tip 6: If you use a CNAME record, don't use anything else.

CNAMEs are a really convenient way of saying "www.example.org is really webserver.example.org". You can't then say "But www has an MX of foo.example.org" or "www is also a subdomain with nameservers at ...".

That'd be contradictory, because you've already said with the CNAME that it's really webserver.example.org. It can't be both, if it's both then it's actually something different altogether and needs its own records.

Relatedly, don't point a CNAME at anything other than a plain hostname - Don't try to CNAME www.example.org to example.org, it'll just break stuff.

Tip 7: Don't firewall out DNS queries to your nameserver.

No, really. The whole internet needs to be able to look up domain names, not just some of it, not just most of it. (You're excused if it's a private nameserver, of course!).

Counterpoint: Using bogon filters on nameservers and ignoring genuine queries.

Bonus Tip: Monitor your servers.

If you're running DNS servers in production, monitor them so you know that you haven't lost one. Once it's all set up right, you really can lose one without noticing.

December 27, 2010

John SleeK1200GT tyre pressure adjustment technique

Note that this probably also works with other BMW models with the tyre pressure monitoring (RDC) option fitted, but I have only tried it on my K1200GT.

If you need to adjust your tyre pressures and you don't have a tyre pressure gauge with you:

  1. ride the bike until the dash starts displaying the pressures
  2. stop the bike and then stop the engine, without touching the key in the ignition. Use the kill-switch
  3. adjust pressures, noting that as you do so, the dash display changes
  4. ride the bike :-)

This may be obvious to people smarter than me.  RDC is a wonderful feature to have.

John SleeEnd of year roundup

A quick blog post to wrap up 2010...

Work: Happy, challenged, excited. No serious complaints. Learning about AIX and Puppet, and of course Linux sysadmin continues to be my main role. Looking forward to the SAGE-AU conference in Melbourne, in September 2011. Didn't take as much time off as I should have, but riding my bike to and from Hobart for the 2010 SAGE-AU conference was extremely satisfying and gave me a good chance to be out of the office and clear my head.

Not-work: In May I started living and working in Sydney full-time. Have been appreciating commuting by train. I ditched my Nokia E71 for an iPhone 3GS and am loving it; it has been the single most satisfying tech purchase I have ever made. Haven't spent as much time in the gym as I should have, but this sorry state of affairs will not continue. I haven't spent nearly as much quality time with Anna as I'd like (we do live in different cities, after all), but I am hoping that this can improve in 2011.

Motorcycling, overall: I put about equal kilometres on the Dakar and K1200GT this year, and in total, rather fewer than last year. I don't have an odometer figure for the K-bike as of January 1 this year, but I do for the Dakar. A combined total of about 35000km, I think. The K1200GT odometer currently reads 51610km, and the Dakar odometer tells a very similar tale. My BMW Roadside Assistance subscription proved worthwhile as I achieved four punctured tyres in three months of riding.

K1200GT: This year saw a lot of warranty repair work on the K-bike, mostly at the time of the 40000km service, where it was at the dealer for a month or more. It now has a K1300 gearbox and clutch, and this does appear to be a bit better than the old units, but still not nearly as good as your average Japanese bike, such as a friend's Blackbird that I had the significant pleasure of borrowing.

F650GS Dakar: 2010 saw this bike back on the road after a bit of a hiatus, and I still have a deep, abiding love for it, especially the delightful little Rotax engine. 40000 and 50000km services were done, and I with the aforementioned Blackbird owner's help, I finished the Pro-Oiler install. The bike still needs more work, though, needing new chain/sprockets, new tyres and (for the second time) new steering head bearings. Michelin's perennial supply problems caused me to get Pirelli's gimmicky new Angel ST tyres instead of my usual Pilot Road2, and this was a mistake that I won't repeat.

Projects: In 2010 I acquired a Honda XL250 K0 (early 1970s model) and the other day I also acquired (Free! Thanks, Norm!) a Honda CT110 "postie" bike. The XL250 has a long road ahead, as I'd like to fully restore it. The CT110 on the other hand I would like to have registered and ridable as soon as possible. I don't think it will cost very much at all to get there. Job #1 is to transport it to my Sydney garage from its current location.

August 22, 2010

Alex JurkiewiczSplashID Sucks

After an evaluation of SplashID (made by SplashData) as a new password manager for my workplace I've come to the conclusion it's snake oil rather than secure. And not just snake oil, but poorly designed snake oil. Here's why.

The architecture of SplashID is simple. The backend is a plain MySQL database. The user interface is SplashID's app, available on Windows and Mac. When you start your client and log in, it communicates directly in MySQL-speak to the database backend. The connection to MySQL is SSLified (yay!), although bizzarely SplashData call this encryption "IPSec". Not having an actual server process between the clients and database is an unusual design, but it's possible to build something secure this way so we press on.

In SplashID's world, each user's access credentials are made up of three parts. Since each user has a MySQL account, the first two are a username and password. The third part is a "master password". What's a master password? I'm glad you asked. You see, every cell of data in the SplashID database is encrypted with the same key. (Encrypted with AES-256 and Blowfish. Why use two ciphers? Why not!) The encryption key is, of course, the "master password". Because all data is encrypted with this key, every user has to have access to it. Most programs do this by storing the "master password" in the database, one copy per user, encrypted with that user's password. Unlike these programs, SplashID just makes every user remember piece of secret information. Why SplashID does this is another mystery, and a strike against them for poor UI design.

Let's investigate this "every user is a MySQL user" concept. I've created a limited user for myself in SplashID with no access to any passwords. The Splash client app obviously lets me see nothing, but how about a generic MySQL client?

Inappropriate syntax highlighting turn on!

$ mysql -u user1 -p -h splashtest
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 92 to server version: 5.1.47-community
 
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| splashiddb         |
+--------------------+
3 rows in set (0.02 sec)
 
mysql> use splashiddb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> show tables;
+-----------------------+
| Tables_in_splashiddb  |
+-----------------------+
| apppreftable          |
| attachmenttable       |
| columninfotable       |
| customicontable       |
| customtypetable       |
| databaseinfotable     |
| eventloggertable      |
| groupsubgrouptable    |
| grouptable            |
| mostviewedtable       |
| recentlyaddedtable    |
| recentlymodifiedtable |
| recentlyviewedtable   |
| recordtable           |
| typetable             |
| usergrouptable        |
| usertable             |
+-----------------------+
17 rows in set (0.02 sec)

It looks like there's only one table that all passwords are stored in. MySQL doesn't offer per-row access controls, but surely I can't view every password in the database with my limited user???

mysql> select * from recordtable\G
*************************** 1. row ***************************
RECORDID: 1F6642A0C892BC76
TYPEUID: 0000000000000013
GROUPUID: 1F66429EC892BBDB
FIELD1: <blob>
FIELD2: <blob>
FIELD3: 
FIELD4: 
FIELD5:
FIELD6:
FIELD7:
FIELD8:
FIELD9: <blob> 
FIELD10: <blob>
NOTE:
HASATTACHMENT: 0
HASCUSTOMFIELD: 0
VIEWCOUNT: 6
*************************** 2. row ***************************
[snip]
10 rows in set (0.03 sec)

Oh dear. Oh dear oh dear.

mysql> Bye

So there you go. Every user in SplashID, no matter how limited, can view every password in the database, all encrypted with a key they know. Another strike against SplashID. They need a miracle now.

And hark! Here comes the explanation from SplashData. I emailed them specifically regarding my findings, wanting to make sure this wasn't some huge mistake. I asked:

...every cell is encrypted using the same process, right? From that it follows that if a user can decrypt one cell, they can decrypt every cell. The only protection is that your encryption routine is not published. Or am I missing something?

The reply:

That’s right Alex.

That’s why I mentioned-
> Actually, they don't use the same key. AES key is a hash function of the
> Blowfish key. I'm sorry I cannot give you more details on the algorithms we use.

So, if the user knows the Blowfish key, it is not enough. They still need to decrypt using SplashID Enterprise application.

Even though every user can download the entire encrypted database, even though the master password decryption routine is stored in the client side application, it's all fine because nobody has ever reverse engineered an application to extract a single hash function before! In the end, the previous security missteps hardly matter compared to this blunder. All it will take is one enterprising security researcher or blackhat to figure it out and put their findings on the web, and suddenly every password in every SplashID install is wide open for the taking by its users.

We won't be using SplashID at my workplace, and my advice to you, dear reader, is to avoid them too.

July 25, 2010

Matt BottrellWhen customer profiling and targeted advertising goes wrong

Don't get me wrong... I love a bargain as much as the next guy or girl.

What I don't like however is when a computer system is implemented with little regard and isn't actively checked by a human.
It's one way to make your company look like a jack-ass.

Sorry Woolworths - you've landed yourself in such a category.

Most Australian supermarket shoppers are aware of the fuel discounts offered by Coles and Woolworths, which can slice anything from $0.03 - $0.20 per litre of the cost of your fuel. Something that's always welcome by motorists.

It's the only reason I have an everyday rewards card. Fuel discounts add up over time, even more so for myself, as I drive with LPG the majority of the time, so $0.20 off per litre on LPG is quite substantial.

During the months of April and May Woolies decided that for 8 weeks straight I would like to buy wine. I'm not talking 1 bottle either. Most 'deals' require a purchase of 6 or more bottles in a given purchase.

A sample of the Email contents is included below:
Sample Email from Woolworths

To be honest, I love a good drop of red. Probably more so than the average punter. (We normally have a few dozen on hand in the house). At the end of March I had let our stocks go down over a period of time so had restocked. This seems to have triggered their rewards system to pester me for the next 8 weeks straight. No fuel offers (which was the main selling point of the card), nor any other offer... just grog.

At 6 bottles minimum per Email over 8 weeks, anyone reading my Email from Woolworths, would think I'm an alcoholic!
Email listing from Woolworths

The crazy thing... It backfired.
I didn't buy any wine during that period. (As I had just restocked my levels.) This form of marketing happens 'after the fact', and as such it fails. If I have already made a bulk purchase, why would I wish to repeat it shortly after, and every week for a period of 8 weeks?

Woolworths reward system needs looking at. (As does Coles for that matter). It would be more beneficial to flag such bulk purchases of your customers, then look at sending it out 'specials' say every 3,6 or 12 months... you're likely to have a bigger uptake. I can't see my car dealership sending out a "buy a brand new car" Emails if I had just taken delivery of a new vehicle.

Certainly for everyday staples, it would be nice to have these filter through regularly. However don't see these, like 25% off either Meat, Fruit or Vegies for a week. It seems to be items like Coca-Cola, Alcohol and other non-essentials. I'm not surprised though... the supermarkets know we need staples.. and are trying to increase our trolley sizes by teasing us into buying these non-basic item.

Certainly I do hope that Woolworths and Coles both learn that their average shopper has the intelligence above that of a broken trolley wheel, as the current marketing strategies to date are quite insulting.

May 11, 2010

Alex JurkiewiczWordpress's WP-Super-Cache's Super Cache with nginx

(Apologies for the triple-layer title, but it's a specific subject involving a badly named plugin.)

This has been explained before (the progenitor for most other examples on the net seems to be this forum post), but the solution was ugly and slightly incomplete. nginx's lack of a one-line RewriteCond equivalent means there will never be an elegant solution, but I think I've come up with something clearer.

First, background. WP Super Cache has two levels of caching:

  1. "WP Cache". Whenever Wordpress's index.php renders a page, a copy of the page output is stored in /blog/wp-content/cache (and the meta subfolder). For future requests for the same page, this cached copy is served by index.php. The good: subsequent requests don't hit the database or re-run your badly coded widgets for every visitor. The bad: PHP still runs for every request.
  2. "Super Cache". As well as a copy of page output being stored as per above, a copy is also stored in /blog/wp-content/supercache, in a structure that mirrors your blog's URL hierarchy. With clever use of rewrite rules at your webserver layer, you can entirely skip loading PHP & Wordpress for any request that a cached file has been created for.

The WP Cache layer always works. The rest of this post is about making use of the Super Cached files with your shiny nginx server. For reference, the Apache rules are here. This nginx code follows the same order and structure, but has some differences. Read:

location /blog {
    gzip_static on;

Aside: gzip_static requires an nginx configured with --with-http_gzip_static_module. If your build isn't, and you don't want to compile your own, just remove this directive. Instead of serving pre-compressed Super Cache files to clients that support compression, nginx will compress them on the fly (like normal).

    set $supercache "";
    if ($request_method = GET) {
        set $supercache "${supercache}G";
    }
    if ($args = "") {
        set $supercache "${supercache}A";
    }
    if ($http_cookie !~ (comment_author_|wordpress_logged_in|wp-postpass_)) {
        set $supercache "${supercache}C";
    }
    if (-f $document_root/blog/wp-content/cache/supercache/$http_host$request_uri/index.html) {
        set $supercache "${supercache}F";
    }
    # If we met all the conditions, serve the supercached file
    if ($supercache = GACF) {
        rewrite ^ /blog/wp-content/cache/supercache/$http_host$request_uri/index.html break;
    }
    # Otherwise pass to wordpress as normal
    if (!-e $request_filename) {
        rewrite ^ /blog/index.php last;
    }
}

# The cache files should not be directly accessible to clients
location /blog/wp-content/cache { internal; }

# Configure the PHP backend as per normal
location ~ (\.php$) {
    include fastcgi_params;
    if (-e $request_filename) {
        fastcgi_pass unix:/tmp/nginx-php-fastcgi.sock;
    }
}

Done! If you have problems, three pointers:

  1. WP Super Cache has a very big settings page. You can set them as you like mostly, but make sure you set this and this (if you're using gzip_static).
  2. Check the bottom of the source of your pages to see if a page was server from the cache, and if so, whether it was served from the Super Cache.
  3. If you need to troubleshoot, make liberal use of the logging facility that WP Super Cache implements.

March 29, 2010

Alex JurkiewiczCross-compiling x264 for win32 on Ubuntu Linux

The total lack of documentation on compiling x264 (and dependencies) for win32 on a linux32 system is henceforth rectified. This guide assumes you are using Ubuntu 9.10 and the packaged version of mingw32. Newer versions of the below packages might require additional/less wrangling.

Required packages in the base system:

sudo apt-get install pkg-config yasm subversion cvs git-core mingw32

Create the basic tree for installing win32-compatible dependancies to:

mkdir -p ~/win32-x264/{src,lib,include,share,bin}

Place this helper script at ~/win32-x264/mingw and chmod +x it:

#!/bin/sh
export CC=i586-mingw32msvc-gcc
export CXX=i586-mingw32msvc-g++
export CPP=i586-mingw32msvc-cpp
export AR=i586-mingw32msvc-ar
export RANLIB=i586-mingw32msvc-ranlib
export ADD2LINE=i586-mingw32msvc-addr2line
export AS=i586-mingw32msvc-as
export LD=i586-mingw32msvc-ld
export NM=i586-mingw32msvc-nm
export STRIP=i586-mingw32msvc-strip
 
export PATH="/usr/i586-mingw32msvc/bin:$PATH"
export PKG_CONFIG_PATH="$HOME/win32-x264/lib/pkgconfig/"
exec "$@"

Now to install pthread & zlib:

cd ~/win32-x264/src
wget -qO - ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-8-0-release.tar.gz | tar xzvf -
cd pthreads-w32-2-8-0-release
make GC-static CROSS=i586-mingw32msvc-
cp libpthreadGC2.a ../../lib
cp *.h ../../include
cd ~/win32-x264/src
wget -qO - http://zlib.net/zlib-1.2.4.tar.gz | tar xzvf -
cd zlib-1.2.4
../../mingw ./configure
# Remove references to "-lc" from the Makefile (tells GCC to link output with libc, which is implied anyway, and explicit declaration causes a script error)
sed -i"" -e 's/-lc//' Makefile
make
DESTDIR=../.. make install prefix=

Installing FFmpeg:

cd ~/win32-x264/src
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
# Delete references to -Wmissing-prototypes, a GCC warning that fails when cross-compiling
sed -i"" -e '/missing-prototypes/d' configure
./configure \
    --target-os=mingw32 --cross-prefix=i586-mingw32msvc- --arch=x86 --prefix=../.. \
    --enable-memalign-hack --enable-gpl --enable-avisynth --enable-postproc --enable-runtime-cpudetect \
    --disable-encoders --disable-muxers --disable-network --disable-devices
make
make install

Installing FFmpegsource:

cd ~/win32-x264/src
svn checkout http://ffmpegsource.googlecode.com/svn/trunk/ ffms
cd ffms
../../mingw ./configure --host=mingw32 --with-zlib=../.. --prefix=$HOME/win32-x264
../../mingw make
make install

Installing GPAC:
Special thanks to the GPAC dev who kindly assisted me in beating the terrible configure/Makefile scripts into shape.

cd $HOME/win32-x264/src
# Create a CVS auth file on your machine
cvs -d:pserver:anonymous@gpac.cvs.sourceforge.net:/cvsroot/gpac login
cvs -z3 -d:pserver:anonymous@gpac.cvs.sourceforge.net:/cvsroot/gpac co -P gpac
cd gpac
chmod +rwx configure src/Makefile
# Hardcode cross-prefix
sed -i'' -e 's/cross_prefix=""/cross_prefix="i586-mingw32msvc-"/' configure
../../mingw ./configure --static --use-js=no --use-ft=no --use-jpeg=no --use-png=no --use-faad=no --use-mad=no --use-xvid=no --use-ffmpeg=no --use-ogg=no --use-vorbis=no --use-theora=no --use-openjpeg=no --disable-ssl --disable-opengl --disable-wx --disable-oss-audio --disable-x11-shm --disable-x11-xv --disable-fragments--use-a52=no --disable-xmlrpc --disable-dvb --disable-alsa --static-mp4box --extra-cflags="-I$HOME/win32-x264/include -I/usr/i586-mingw32msvc/include" --extra-ldflags="-L$HOME/win32-x264/lib -L/usr/i586-mingw32msvc/lib"
# Fix pthread lib name
sed -i"" -e 's/pthread/pthreadGC2/' config.mak
# Add extra libs that are required but not included
sed -i"" -e 's/-lpthreadGC2/-lpthreadGC2 -lwinmm -lwsock32 -lopengl32 -lglu32/' config.mak
make
# Make will fail a few commands after building libgpac_static.a (i586-mingw32msvc-ar cr ../bin/gcc/libgpac_static.a ...). That's fine, we just need libgpac_static.a
cp bin/gcc/libgpac_static.a ../../lib/
cp -r include/gpac ../../include/

Building x264:

cd ~/win32-x264/src
git clone git://git.videolan.org/x264.git
cd x264
./configure --cross-prefix=i586-mingw32msvc- --host=i586-pc-mingw32 --extra-cflags="-I$HOME/win32-x264/include" --extra-ldflags="-L$HOME/win32-x264/lib"
make

Leave to cool for 15 minutes. Serves four.

Changelog:

  • 20100518: Updated ffmpeg configure args. ffms build needs mingw wrapper. Add cvs to required packages.

December 09, 2009

Matt BottrellCan't beat 'em, join 'em

Well I ranted in my previous post about being held hostage to Farmville.

It was in jest and was poking my adorable wife.... :-)

I bit the bullet in the end, and finally joined Facebook and even bloody Farmville.
There should be a law against that game, it's far too addictive. :-P

So dear reader, I'm still wiping egg off my face... I held out for years and didn't see the point of it... but it looks like I've slipped and fell on it.

Though, I gotta admit this whole FB think is great for keeping in touch with long lost friends.... it's really quite scarey.
Pity one can't always seem to shake those people you'd rather forget. :-|

I'm not yet on Twitter, but who knows what 2010 will hold in store.

November 15, 2009

Matt BottrellInnocent Farmville hostage.

It would appear that even whilst I don't use either Twitter or Facebook -- I happen to be held hostage often to Farmville.

I have elected not to join either two communities for several reasons:

  • I seriously spend far too many hours a day on a computer (12-18 hours a day). I don't need something else to add to the hours.
  • I like keeping some level of personal privacy. I really don't have a need to post what I ate for breakfast, what my favourite book/movie/music/clothing is. (You really want to know my favourite music is -- follow me on last.fm). I also have a blog where I can write down my thoughts/opinions/frustrations already.
  • I have multiple methods to keep in touch with those I elect to already. (Email, IM, Telephone, SMS). I seriously couldn't give a flying razoo about people I went to primary/high school/Uni with. I haven't seen them for over 20 years, and I don't have the desire to kindle the relationship due to the mere fact we attended the same education institution (and for the majority of that time -- compulsory; I'm sure neither of us wanted to be there!)

Having said that -- I don't object to others that do use the services. Each to their own I say. 8-) (But don't expect me to accept invites for either -- both are duly ignored!) :-P

Pauline is a Facebook user, she enjoys it... she catches up with a lot of old friends via it. She has put off joining Farmville for months, but finally caved to the constant barrage of invites and joined.

I now seems our daily life resolves around 'harvest time'... a classic case of seeing the Farmville Alarm come into effect. An often quoted phrase at present is
'Ohh, I have to go harvest X .... gimme 10 mins.'
This can happen at the most inconvenient times. :-|

So at present, I feel I'm affectively a Farmville hostage. I'm wanting a virtual world-war to break out so that bombers blow up the fields. I might get a bit of normality back in my life. :-P

October 19, 2009

Matt BottrellTeddy bear moments

I think we can all attest to the phenomenon known as the Teddy Bear troubleshooting.

I think we all probably need our own Teddy Bears in each of our human office box cubicles or work desks.

So next time you need to do some serious troubleshooting or some heavy lifting when debugging - try pulling out the Teddy Bear.
Even better, you can hug something after it's solved! 8-)

October 08, 2009

Tim KentBlackBerry MDS proxy pain

I'm just having a rant about MDS SSL connections through a proxy. Non-SSL traffic will work fine, however SSL traffic appears to go direct even when proxy settings have been defined as per KB11028. My regular expression matches the addresses fine.

Surely people out there want/need to proxy all their BES MDS traffic?

March 24, 2009

Mark [Cueball] GlossopHumour of the Day: AFL Grand Final

Received this in an email a couple of years ago. Seems appropriate to repost given my impending excursion to Melbourne for Round 1 of the AFL Premiership Season 2009…

Ah – 4 games of live footy in a weekend [plus the Eagles v Lions game on a big screen of course]…

It’s the AFL grand final and a man makes his way to his seat right on the wing. He sits down, noticing that the seat next to him is empty.

He leans over and asks his neighbor if someone will be sitting there.

“No,” says the neighbor. “The seat is empty.”

“This is incredible”, said the man. “Who in their right mind would have a seat like this for the AFL Grandfinal and not use it?”

The neighbour says “Well, actually, the seat belongs to me. I was supposed to come with my wife, but she passed away. This is the first AFL Grand final we haven’t been to together since we got married in 1967.”

“Oh … I’m sorry to hear that. That’s terrible. But couldn’t you find someone else, a friend or relative, or even a neighbor to take the seat?”

The man shakes his head “No, they’re all at her funeral.”

March 20, 2009

Mark [Cueball] GlossopSome Thoughts on IT jobs and Working Conditions

Had an interview recently. Overall the interview itself was relatively positive, and I think the challenge that was offered was something that I’d have been quite up for, but I had some reservations about the work environment – more than just “passing reservations”, so I thought I’d put some thoughts onto digital paper, so to speak.

I do have fairly strong feelings about the inadequacies of “open plan offices” for IT workers [or more generally, “knowledge-based workers”.] To give you a better idea of what I am referring to:

  • Peopleware – possibly the single-most important reference on working conditions for tech workers. It shows comprehensively how people with fewer distractions get more productive work done than those who are constantly interrupted[1][2]:
    “The people who brought us open-plan seating simply weren’t up to the task. But they talked a good game. They sidestepped the issue of whether productivity might go down by asserting very loudly that the new office arrangement would cause productivity to go up, and up a lot, by as much as three hundred percent. …The only method we have ever seen used to confirm claims that the open plan improves productivity is proof by repeated assertion.”
  • Joel’s [Original] ‘Bionic Office’
  • Joel’s Updated Offices – keep in mind this is Manhattan office space, so getting the best people on board requires the best environment. Contrariwise, you may not get the worst people in the worst environments — but the “best” IT people will usually move on to better, more productive environments fairly quickly.
  • Open plans make establishing “Mutual Interruption Shields”[3] almost impossible.
  • Tom Limoncelli also makes the following quote here:
    The biggest time management problem for system administrators is interruptions.
    I tend to think that the same problem applies to software developers – it’s sometimes referred to as a “mental context switch”, and can cut the productivity of your IT workers in half – or worse. Open plan offices are, generally speaking, the epitome of evil when it comes to protecting your IT employees from interruptions.
  • A Field Guide to Developers – some interesting observations about what things are [and aren’t] important to IT workers [the article was written with software developers in mind, but in my experience systems administrators are quite similar in their expectations and ideas about “good workplaces”.] From the Field Guide:
    “One thing that programmers don’t care about – They don’t care about money, actually, unless you’re screwing up on the other things. If you start to hear complaints about salaries where you never heard them before, that’s usually a sign that people aren’t really loving their job. If potential new hires just won’t back down on their demands for outlandish salaries, you’re probably dealing with a case of people who are thinking, ‘Well, if it’s going to have to suck to go to work, at least I should be getting paid well.’

    “That doesn’t mean you can underpay people, because they do care about justice, and they will get infuriated if they find out that different people are getting different salaries for the same work, or that everyone in your shop is making 20% less than an otherwise identical shop down the road, and suddenly money will be a big issue. You do have to pay competitively, but all said, of all the things that programmers look at in deciding where to work, as long as the salaries are basically fair, they will be surprisingly low on their list of considerations, and offering high salaries is a surprisingly ineffective tool in overcoming problems like the fact that programmers get 15” monitors and salespeople yell at them all the time and the job involves making nuclear weapons out of baby seals.”
  • From The Practice of System and Network Administration, Chapter 35.1[4]:
    The hiring process can be simplified into two stages. The first stage is to identify the people whom you want to hire. The second stage is to persuade them that they want to work for you.
    Making a persuasive argument with a poor workplace environment is always going to be difficult, regardless of salary or any other factors. Many people in the IT industry can be “unique” in this respect – they find roles that keep them interested and excited about each day at work – and that aspect is far more important than work that pays a top-dollar salary but is rote and monotonous.

Some things I noted about the place where I interviewed (either from observation while I was waiting, or during the interview):

  • Almost all IT staff in one open plan area. Think of a 1950’s newspaper bullpen, and you get the idea. There was one area to the side where where some of the more senior staff seemed to have their own bullpen.
  • Not even cubicles for some semblance of privacy. I’ve worked in a place where even the telephone operators in the call centre had more privacy and insulation from distractions.
  • Apparently this “extreme open plan” was a deliberate decision — it was apparently part of an ongoing attempt to fix some ingrained cultural deficiencies. [How exactly this was expected to achieve their goals is still unclear to me…the actual problems weren’t fully disclosed.]
  • Some people were trying to work while others carried on in one corner of the room in a fairly noisy discussion – from what I could see and from the information I was provided in the interview, there was no separate meeting area or room for ideas to be brainstormed. Not seeing the impact of that on overall worker productivity completely escapes me.
  • The interview itself was conducted in one of the few private offices [presumably because privacy is important for an interview, and without a private meeting room, what else will you do?]
  • From what I could tell, only very senior management were allocated the few private offices. Apparently parking was allocated on a similar theme…only for the very senior.[5]
  • No space for individual whiteboards or reference libraries. No, Google doesn’t answer all questions, and the two whiteboards I saw seemed to be shared by all staff.
  • Two excessively noisy airconditioners — not a ducted or even split A/C system, and the compressors were completely underspecified for the office space/volume [making them run at or above capacity by the sound they were making – and it wasn’t even a hot day.]
  • Very large space with large windows, but using overhead lights instead of lots of natural light — opening the blinds and letting more light in seemed like an easy fix, but one that seemed to be overlooked by a lot of intelligent people.
  • The space could actually quite easily be converted into a two-storey, split or lofted area, providing significantly more workspace area and worker privacy. But I expect that would be too much money spent on IT workers [hmm, wait, apparently that’s the thinking that caused many of these problems initially! Meh.]
  • Non-ergonomic chairs and desks. If you’re putting people in chairs for 8 hrs per day, those desks and chairs had better be comfortable and compliant with occupational health and safety regulations.
  • Multiple monitors – if you’ve got 4 different 19” monitors attached to a single machine – maybe, just maybe, you should consider using those monitors elsewhere and buying two 24” monitors. You get 13% less pixels in a typical scenario, but only two monitors with more actual pixel real estate. Two monitors that use less power, are easier to manage and there’s only one break in your overall screen real estate. You’re also less likely to waste time juggling windows from one screen to the next – which is another productivity win. Sure it’s a small detail, but lots of small things over a long time actually add up pretty quickly.[6]

Recruiting new staff for such poor environments is going to be difficult. Not impossible, but definitely difficult:

  • If you’re planning to build a team – changing the environment to attract good candidates is critical to your prospects of building a top-notch technical team.
  • In a place where salaries aren’t really competitive, and office working conditions are assessed with a low priority, people are going to want you to offer other remuneration options.
  • Options you ask? Such as a subsidised mobile phone, PDA and broadband[7], telecommuting, higher than standard superannuation, salary packaging/salary sacrifice options, free or subsidised parking, regular technical training, flexible working hours, less restrictive dress codes, and of course the aforementioned things like private offices and quiet work environments.
  • Given the current economic climate, and the tight budgets most businesses presently have, flexibility on “alternative” remuneration options seems like an easy option to consider, yet seemed like “a bridge too far” for this place.
  • The poor economy isn’t going to last forever – when that happens, employers are going to find themselves on the back foot due to staff attrition: “the grass is always greener”, and when you’ve put up with poor conditions for long enough, it doesn’t take much to say “hey, I can do better – I’m out of here.” All it takes for that is a slight salary bump. If you provide a great work environment, better salary isn’t always going to compensate for that. [If tell you you can work in a great IT job with a great team for $70k p.a., then offer a crap, boring job with lousy conditions for $95k p.a. — how many IT people will take that? The number is a lot lower than you might think.]
  • So – bad conditions, non-competitive salaries and lack of alternative remuneration options all add up to “don’t work here unless things change”.

I’m lead to understand that the role I interviewed is a new role, paying OK[8] with significant responsibilities and strong prospects for advancement, yet it has gone unfilled for some time. I’m not completely surprised. If something was to change and I was offered the role, I’d still feel “80% positive, 20% negative” about it – but that 20% could easily make the difference between a 9-12 month stop-gap tenure and a 3+ year team-building role. It simply would depend how committed they proved to be about making real change, and providing a top-notch workplace experience.

The Nutshell Version For Employers:
  • The current economic climate will not last forever. Signs of recovery are already present in Australia.[9] If you’re reading this from the US, expect similar changes as the ARRA stimulus kicks in on all the huge IT projects Obama has approved.
  • Despite the climate, quality IT staff are still in demand. That demand will only increase as the economy recovers.[10]
  • Treat your staff well.
  • Pay them at least comparable salaries to other people doing the same work at other companies/organisations/institutions.
  • Offer alternative remuneration options.
  • IT workers almost always have backup plans[11] – poor timing may be the only problem for them. At the moment.[12]
  • If you don’t make them secure when times are bad, the first chance that comes along for better conditions and better pay may well leave you in the lurch, if you ignore this advice.
  • IT workers talk to other IT workers. Information will and does travel.
  • Perth isn’t a very large place. Information definitely travels quite easily in the IT industry here[13]
  • Information – good and bad – travels easily through mechanisms that may not always be known to you[14] “IT Networking” isn’t always about Cat5 cable :-)
  • Don’t think that people will stay out of loyalty when you’ve treated them like crap.[15]
  • If you’re an employer and this is all news to you – you really need to do your homework better.

My $0.02 for today.

P.S. If you’re going to comment, please refrain from mentioning names, if only to protect the guilty :-D

  1. Peopleware pp. 52-3.
  2. And yes, I’m aware that the authors of Peopleware aren’t against all shared workspaces – but those who share workspaces should be working on similar tasks or projects
  3. From Time Management from Systems Administrators
  4. The Bible for System Administrators IMHO
  5. Everyone else was expected to battle for the limited public parking available in the precinct. No subsidisation. I got the impression that since there was a train station very close by that there was an expectation staff would use that option. Never mind that public transport would actually cost me the same or more than driving and parking.
  6. Kudos where due – actually having multiple monitors for tech workers is almost a given these days, but I’ve still seen places where it’s not done, despite being de rigueur for programmers/sysadmins.
  7. Yes, accessing systems from home is important, even if you’re not offering any sort of telecommuting.
  8. Although I was offered $5-$10k less than what I would expect for a comparable role at a similar employer
  9. The stock market may take 2-3 years to regain lost ground, but that doesn’t reflect the health of an economy – continued growth does.
  10. Yes, I see the irony between my statement and the fact that I’m still looking for work. Am I a quality IT worker? Yes. Am I selling myself properly? Maybe not. Am I possibly overqualified for some roles? Maybe. I’ve really never been out of work for long enough to care, so maybe job hunting is one area where I need to learn a few more things. I’d much rather be improving my tech skills and working on interesting things however.
  11. Sometimes multiple backup plans.
  12. And yes, I’m being deliberately cryptic.
  13. Some might say it doesn’t matter where you are.
  14. Say, for instance, a lunch with former colleagues who happen to know a lot more than you ever expected about the environment you were considering.
  15. As a historical reference, I was only earning about $63k (all up) when I was working at $JOB-2 — money wasn’t everything. I left mainly because of two things:
    • The offer of a more challenging position with better conditions
    • The prospect of the existing working conditions at $JOB-2 being sharply compromised was becoming very real. [After I left, that “prospect” did in fact become a reality.]
    There were other, less significant factors – but those were the two main ones.

March 18, 2009

March 04, 2009

Mark [Cueball] GlossopWWDC 2009

From a source that I can verify as being accurate for (at least) the last two years, WWDC 2009 will be held in San Francisco at Moscone West. The dates?

Monday June 8 – Friday June 12

I wouldn’t go booking flights or hotels just yet, but that’s when I’m planning on being in SF again…i.e. nothing’s definite until Apple makes the announcement, but that’s the info I have from a previously reliable source.

Will update info if I get any more news.

Belated Update: I was in Melbourne for the footy when the announcement was made last week, so I forgot about updating this post. Dates above are confirmed. See WWDC site for more info.

Mark [Cueball] GlossopFreeview TV – The Real Advert

OK so it’s no secret I’ve got a fair bit of pent-up animosity towards Australian network TV…so it shouldn’t be any surprise that I found this little gem on YouTube quite in line with my sense of humour.

Note: if you’re not reading from Oz, then you probably won’t have seen the Freeview ads – but you should still be able to get a laugh out of it…network TV programmers worldwide pull the same crap whatever country you’re in.

Edit: Turns out Freeview didn’t like this being on YouTube. I believe there’s another way to get the video; will update when I find out more…but for now the link below doesn’t work.

Freeview – The Real Advert

Edit 2:
Updated TV Tonight article about the video.
Reposted: YouTube – repost.
Downloadable movie version available from DownWind Media.

January 07, 2009

Tim KentDNS resolution on iPhone

I've been playing with a few iPhones lately and have had trouble getting WiFi working through our proxy. After much hair pulling the problem turns out to be a feature in the iPhone DNS resolver that refuses to look up any hostname ending in ".local". This also appears to be a problem on Mac OS X:

http://support.apple.com/kb/HT2385?viewlocale=en_US

With OS X you can add "local" to the Search Domains field and disable this behaviour, unfortunately it doesn't work for the iPhone.

October 26, 2008

Tim KentVoIP headaches

I've recently signed up with PennyTel to get better prices on phone calls. This was after two relatives of mine both recommended PennyTel and said how easy the whole thing was to set up when using a Linksys SPA-3102.

OK, so I signed up and purchased the Linksys device. I set the networking stuff through the phone then followed the guide on the PennyTel website to configure SIP (VoIP connectivity stuff). I was feeling pretty good about the whole thing, that is until I made the first phone call!

I thought I'd try to impress a mate so I called up one of my tech savvy friends and told them I was using VoIP to talk to them. The quality sounded quite good, then after 32 seconds the call dropped out! I had called a mobile so I thought it may just be a glitch. The next two calls resulted in the same drop out after 32 seconds. By this stage my friend thought it was quite amusing that my new phone service was so unreliable after I had been boasting about the cheap call rates!

After hours of Googling and messages back and forth between PennyTel support, I still hadn't managed to avoid the call drop out, or another intermittent problem where the SIP registration was randomly failing. The settings looked fine, and PennyTel didn't appear to have any outages as I tested things with a soft phone from another DSL connection. I was really regretting the whole thing, and getting pretty pissed off. I had a think about the whole scenario, and the only thing I hadn't eliminated was my DrayTek Vigor 2600We ADSL router. I had already set the port forwards required for the Linksys SPA (UDP 5060-5061 and 16384-16482) so thought nothing more of router configuration. As a last resort, I searched the Internet for people running VoIP through their DrayTek to see if any incompatibilities existed. I came across a site with someone experiencing my exact problem, and they had a workaround! It appears that the 2600We has a SIP application layer proxy enabled by default. This really confuses things on the Linksys and has to be disabled. After telnetting to the device and entering the following command, things were working great:

sys sip_alg 0

Note that you may need to upgrade your DrayTek firmware for this command to be available.

After the changes I made some calls and no longer got disconnected after 32 seconds! Woohoo! At the end of the day I'm glad I chose VoIP for the cost savings, even though it caused me grief the first few days.

Update: One other setting I have found needed a bit of tweaking was the dial plan. Here is my current Brisbane dial plan for an example:

(000S0<:@gw0>|<:07>[3-5]xxxxxxxS0|0[23478]xxxxxxxxS0|1[38]xx.<:@gw0>|19xx.!|xx.)

August 31, 2008

Tim KentData destruction

After cleaning my home office I was left with some old hard drives to dispose of, this got me thinking about data destruction. In the past I cleared my drives with a couple of passes of random data using dd, but is this thorough enough?

This time round I have used a free bootable CD called CopyWipe (great utility, BootIt NG is also worth a mention). Each drive was given 5 passes, and then taken to with a hammer just to be sure. I've linked a picture to the "after" shot.

I can see data destruction being a larger problem as time goes on. I'd be interested to know the techniques others use for this problem.

August 27, 2008

Tim KentArchiving files from my Topfield PVR

I've had a Topfield PVR for quite a few years now. The unit is great, I can't fault it really. Until recently I did however have one ongoing problem; I kept running out of space! To help combat the space problem I upgraded to a Samsung 400GB drive but this was only a short term band-aid.

The next solution was commissioning a Linksys NSLU2 running uNSLUng and ftpd-topfield to allow FTP access to the unit (my computer isn't anywhere near the TV and the Topfield only has a USB port). So the space problem on the Topfield was fixed, but I had loads of transport stream files sitting on my computer. It was just too expensive (time-wise) to edit out all the ads, convert to MPEG-2 and burn to DVD or DivX. So last weekend I scripted it:
  • Create ad removal cutpoints with comskip
  • Feed the cutpoints into ProjectX then demux
  • Combine the audio and video into an MPEG-2 file with mplex
  • Encode with Dr. DivX OSS
Seems to work quite nicely, the ad detection works fairly well but it's not 100% perfect. One thing I had to do to get comskip working was rename the file extension from REC to TS.

The whole thing was fairly trivial after reading the CLI documentation for each program, but if you need a hand feel free to contact me.