Archive for September, 2009
Configure CPAN.pm to use sudo to install
by bigpresh on Sep.30, 2009, under Perl, Programming
I prefer to run CPAN.pm as a normal user and have it use sudo just for the actual installation, rather than running tests etc as root.
I have an annoying habit of forgetting the option names , so I’m posting this here for my reference, but might be useful for other people too.
To do that, do the following from a CPAN shell:
o conf make_install_make_command 'sudo make'
o conf mbuild_install_build_command 'sudo ./Build'
o conf commit
Also, whilst documenting that, to set your preferred CPAN mirror:
o conf urllist unshift ftp://mirrors.uk2.net/pub/CPAN/
o conf commit
New Jabber/XMPP account
by bigpresh on Sep.25, 2009, under Uncategorized
I’ve been meaning to do it for ages, but Google’s (admittedly brief) downtime yesterday pushed me enough to actually do it – I’ve set up my own Jabber server, so my new Jabber ID is davidp@preshweb.co.uk – feel free to add me. I won’t be monitoring my old Google Talk account as much.
Now I just need a decent, capable Jabber/XMPP client for my Blackberry!
Texas Instruments DMCA abuse over signing keys
by bigpresh on Sep.19, 2009, under Information Security, Wibbles
Paul Dixon, owner of pastebin.com, received a DMCA takedown order from Texas Instruments, relating to a pastebin post that a user had submitted to pastebin.com, "containing the signing keys for a range of Texas Instruments calculators which, if I understand correctly, allow you to digitally sign a replacement operating system so that the hardware will accept it"
They seem to overlook the fact that Paul is in the UK, and pastebin.com is hosted in the UK, so throwing DMCA notices around is a little pointless, acheiving nothing more than making themselves look bad.
In fact, the Streisand Effect pretty much guarantees that such attempts backfire, and result in nothing more than causing the material they desire to censor to be more widely distributed.
In fact, with information leaked to wikileaks, it’s a lost cause already.
When will companies learn that attempting to artificially control what people can do with their devices which they bought and legally own needs to stop, and that the Internet routes around censorship attempts?
SSH key for Subversion but nothing else
by bigpresh on Sep.17, 2009, under Linux, System Administration
I needed to create an account with an SSH key which could be used for Subversion, but nothing else.
The solution – forced commands with the SSH key – on the host machine, make ~/.ssh/authorized_keys look like:
command="/usr/bin/svnserve -t",from="
Dumping this here mostly for my future reference, and for anyone who might find it useful.
This means the SSH private key on the client can be used by Subversion to check code in/out, but cannot be used for anything else (as SSH’ing to the host machine with that key simply starts ‘svnserve’, regardless of what the client asked for).
Suspicious Vodafone bonus text message
by bigpresh on Sep.16, 2009, under Wibbles
I got a text message on my old mobile phone (which I’ve moved to PAYG, to keep the number active), purporting to be from Vodafone, received 15-Sep-2009, and stating:
Thanks, for being a Vodafone customer, we'd like to give you £1 free credit. Just text REWARD to 97888 for free by 24Sep09. To stop texts send STOP to 9774
This made me immediately suspicious, as it’s trivial to fake the sender of a text message to appear to have come from “Vodafone” or whatever name/number you like, and it sounded like a reverse-billing SMS scam.
However, I recognised 9774 as the number Vodafone really use to stop receiving texts, so if it was a scam, they’d at least done their homework.
Googling reveals that the shortcode 97888 is indeed a Vodafone number, used, among other things, to request their “Vodafone Passport” deal, and turns up a forum thread on the subject.
(Amusingly, the forum thread includes a nice little rant:
I GOT NOTHING and its annoying i cannot believe voda sending these messages then again , yes i can..
its like the annoying canvassing phone calls.
can we do anything to stop them ? from voda.
one annoyed voda customer.
Um, what? The clear, simple “To stop texts send STOP to 9774″ at the end of the message too hard to understand, perhaps?)
Mounting a Linux software RAID partition directly
by bigpresh on Sep.14, 2009, under Linux, System Administration
I needed to mount a Linux software RAID partition directly to copy the data from it; it wasn’t being recognised as a RAID device (it didn’t appear in /proc/mdstat, only my newly-created array did), and attempting to mount it gave me:
[davidp@supernova:~]$ sudo mount /dev/sdc4 /mnt/tmp mount: unknown filesystem type 'mdraid'
To get round that, I had to tell mount the filesystem type that was actually in use:
sudo mount -t xfs -o ro /dev/sdc4 /mnt/tmp
(I mounted it read-only just in case this approach wasn’t going to work; I don’t want to write to it anyway.)
Might be useful for anyone Googling (it’s pretty obvious, but it made me think for a few minutes… it’s getting late!)
The partition type appeared as ‘Linux raid autodetect’:
Disk /dev/sdc: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track, 24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x7bf29ced Device Boot Start End Blocks Id System /dev/sdc1 * 1 871 6996276 fd Linux raid autodetect /dev/sdc2 872 995 996030 fd Linux raid autodetect /dev/sdc3 996 1119 996030 82 Linux swap / Solaris /dev/sdc4 1120 24321 186370065 fd Linux raid autodetect
Lyrics::Fetcher::LyricWiki updated
by bigpresh on Sep.08, 2009, under Perl, Programming
LyricWiki.org used to provide the ability to retrieve lyrics via an API, which was handy.
Recently, LyricWiki effectively ceased, but the project and all the contributed lyrics so far were migrated to Wikia.
Unfortunately, it seems the record labels demanded that lyrics no longer be available via the API, and can only be served up on a web page.
Therefore, I’ve updated Lyrics::Fetcher::LyricWiki appropriately.