Everything is Broken

ClamAV reporting Outdated version

May 4th, 2010 admin

Just to remind myself as much as anything, as I’ve been through this a few times. ClamAV was complaining loudly in the logfiles about not having the most up to date ClamAV. I searched around and was pointed to the Debian Unstable repository to /etc/apt/sources.list (Read the whole article before you add this one …there is a better one)

After that, on running apt-get update, you get a message like this:

W: GPG error: http://volatile.debian.org etch/volatile Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY DFD993306D849617

So, take the pubkey number off the end and do this with it.

sudo gpg --keyserver subkeys.pgp.net --recv-keys DFD993306D849617
sudo gpg --armor --export DFD993306D849617 > new.key
sudo apt-key add new.key

I then got a message saying “The following packages have been kept back: clamav clamav-daemon clamav-freshclam”

By using

 sudo aptitude dist-upgrade

(NB aptitude rather than apt-get) the new packages are downloaded. However they’re still not up to the level that ClamAV is telling me to upgrade to.

So, more searching. It turns out the most up to date Ubuntu Repositories are from this page … https://launchpad.net/~ubuntu-clamav/+archive/ppa. In my case the solution was to add these lines to my /etc/apt/sources.list

deb http://ppa.launchpad.net/ubuntu-clamav/ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/ubuntu-clamav/ppa/ubuntu hardy main

And then run through the pubkey process above, with the different pubkey id number. Later distros might get away with the add-apt-key command, but I was running hardy (8.04) on this particular server.

Posted in General IT, Linux, Security | No Comments »

Adventures in unbricking a router

April 7th, 2010 admin

Another fantastic illustration of how Linux ‘gets the job’ done. Although sometimes the operator (ahem) is sometimes a bit slow on the uptake.

Anyway, I had a Linksys WRT54G router in which the wireless unit had blown up after a power outage and surge. Gotta love the Philippines. I had dd-wrt on it, but decided to try out OpenWRT. Well lets just say that OpenWRT isn’t to my taste. I wanted something which worked more or less immediately, rather than poring over documentation trying to figure out how to get the WAN interface up via a command line.

So I dropped the router into a drawer until today, when I needed to use it for something (without the need for wireless). Well of course when I needed it, it wouldn’t boot. In fact I couldn’t even ping it. This is bad news.

I tracked down an internet post which mentioned that if I held the reset button while booting, the router would go into admin mode, which meant I could ping it. I did this and it worked. I read elsewhere that in order to flash it with tftp, I needed to do so when the ping response time was 100ms, before it dropped to 64ms. Exciting stuff. I set up the tftp flashing machine and tried, possibly 50 or 60 times, to flash back ddwrt. No luck. For reference, here is the one liner:

echo -e "binary\nrexmt 1\ntimeout 60\ntrace\nput ddwrt.bin\n" | tftp 192.168.1.1

I did an nmap scan of the router and found that port 23 was open, so I managed to telnet into it. I couldn’t connect the wan interface (as previously noted), but I had a command prompt. No SSH, no web interface. So how to get the ddwrt.bin file onto the router via telnet?

Here’s how: On my PC, at 192.168.1.50, I went to the directory which held the ddwrt.bin file. At the command prompt I typed

python -m SimpleHTTPServer

This serves up the current directory over HTTP, port 8080.

In my router telnet session I went to the /tmp directory (the only place with enough space for the file) and typed

wget http://192.168.1.50:8080/ddwrt.bin

After a few seconds, the file was there! Alright!

Still in the router, I did

mtd -r write dd-wrt.bin linux

The router whirred for a while, rebooted and … ddwrt was back, in all its web-interfacy autoconfigurating glory.

What a great trick with SimpleHTTPServer. Shame I wasted hours on the tftp approach. Incidentally, there’s a similar tool which will let people upload files to your computer via HTTP, called droopy.

Posted in General IT, Linux | No Comments »

One Line Guitar Tuner

March 16th, 2010 admin

Every now and then I come across something which makes me marvel at the flexibility of Linux. This is one of these things.

I play guitar, and I’d previously written a small script to act as a guitar tuner. I generated some .ogg files of the correct pitch and then wrote a script to loop through them in sequence. “Pretty good”, I thought, “Clever Me.”

Then a few days ago I came across this little gem of a script.

for n in E2 A2 D3 G3 B3 E4;do play -n synth 4 pluck $n repeat 2;done

That’s it. Sheer brilliance. Of course you’ll need to install the sox package first.

Posted in General IT, Linux | No Comments »

Captcha Madness

November 18th, 2009 admin
Captcha If You Can

Captcha If You Can

I understand what captchas are for, and why we need them, but they seem to be getting out of control. I recently visited a site which had the captcha displayed here.

For the record the first word wasn’t ‘stirred’. I saw the option for an audio captcha and wondered how you pronounce ‘Ohehyahtah’. If that indeed was the second word. Too good to miss. I pressed the button and found that the audio captcha is just as bizzarrely impenetrable as the text. The mp3 file of it is here, and it reminded me strongly of an early David Lynch film]. Back to the text: after refreshing the words two or three times I was eventually able to get to the next stage.

The next stage involved typing a random string of letters into a box – approximately 200 characters. The web page did kindly suggest that I could cut and paste them into the box, which I did, but really, what this did was turn a quick attempt to give someone some feedback on their blog into a task akin to hacking into NASA.

Security shouldn’t be that hard. It should be as unobtrusive as possible. Roll on the next anti-bot paradigm.

Posted in General IT, Life, Security | No Comments »

Ubuntu upgrade 9.04 to 9.10

November 5th, 2009 admin

Screenshot-Update ManagerI’ve learnt my lesson on this a few times: things break when you upgrade Ubuntu on laptops. I can understand why. There is a huge variety of hardware for laptops, particularly BIOSes, sound chips and wireless chips, and every manufacturer likes to tweak them a bit. The Linux kernel has the unenviable task of having to support ALL of them immediately, whereas in Windows the hardware component manufacturer supplies drivers which you have to install to get your machine working correctly.

Anyway, for example, last time I upgraded my two laptops from 8.10 to 9.04, a lot of things broke, and I was hurting for a long time. In fact one of the laptops never really got straight. This was irritating for me, but as I had another laptop to use for my main work, it wasn’t a major annoyance. But I can imagine if you only have one machine and the sound doesn’t work on it, for example, it would leave a nasty taste in your mouth.

So this time, I started with the Thinkpad R51e, which is my spare laptop. I have the /home directory mounted on a separate partition, which makes things really easy. Basically you just blow away the main OS partition, and then remount the your data partition at /home, preserving all your data. (OK its a little more complicated than that, but I’m not blogging about that right now). Read the rest of this entry »

Posted in General IT | No Comments »

Dropbox for offsite backup

June 8th, 2009 admin

I’ve recently been using Dropbox. Its a free offsite backup service, which works with Windows, Linux and Mac and gives you 2Gb of space for free. You can pay for more if you need it. Here’s what I like about it:

  • It just works. Drop your files into a folder and forget about it.
  • You can join more than one computer to the same account and the files sync between both computers. eg one at work, one at home.
  • If you’re away from you computer and you need a file, you can get it from the web interface. (But of course you’d only do this on computers you trust
  • There are different levels of privacy. Private files are only seen by you. However you can share files with certain people, by supplying their email addresses. You also have Public files which can be downloaded by anyone at all with the given URL. Much more control than senduit.com for example.
  • Photos put in the photo folder are instantly made into galleries. Neat.
  • You can roll back to a previous version of a file if you make a mistake.

Having said all that, I wouldn’t trust super secret work or personal documents to it, but for keeping a backup of photos and non-sensitive personal docuements, it works a treat.

Also, there’s a referral program on at the moment, so if you sign up via the link below, you get an extra 250Mb of space. And so do I as well … go on … its free, and you’ll be glad you did.
https://www.getdropbox.com/referrals/NTI3NDkwMDk

Posted in General IT, Security | 2 Comments »

PLDT SMTP server.

June 2nd, 2009 admin

Man this is the best kept secret in the entire telecoms industry … I’ve been trying to send email through PLDT’s SMTP servers as I’m a broadband customer of theirs, and my normal SMTP server wasn’t working. I needed to get an email out, and I was getting a little desperate.

So apparently the published SMTP servers don’t actually work. Yay! If you try looking on the PLDT website, where you might expect to see this kind of useful information … well just don’t bother. You get seasick pretty quickly from all the flash whoopiness, and the dead ends and 404 start to piss you off after a while. So then you do a few google searches and come up with a couple of published servers, which basically don’t work: smtp.info.com.ph and smtp.pldtdsl.net

So, eventually I cracked and went to the Customer Hotline. After re-phrasing my question several thousand times until I was understood, the answer was … smtpdsl4.pldtdsl.net , using port 587. Which actually works.

Port 587, yes of course, why didn’t I guess that one.

Posted in General IT, Philippines | 2 Comments »

Printing Web pages the way you want ‘em

May 4th, 2009 admin

icon_alone_fullJust came across this awesome tool which will let you format webpages in real time, and then output them to a printer.

Here’s the URL http://www.printwhatyoulike.com/

And here’s a link to this very page opened up in the site, so you can try it out.

Brilliant. Why didn’t I think of that …. Oh, and they’ve also got a ‘bookmarklet’ (great idea, terrible name) which you can drop onto your IE or Firefox toolbar which gives you quick access to the functionality of the site. Just click the button, and the page you’re currently browsing will open in the Printwhatyoulike website.

Posted in General IT | No Comments »

Ubuntu Firefox’s Tattletale Search Query

April 23rd, 2009 admin

Search SimplificationHave you ever noticed that when you type a search term into the search box in the top right of your Firefox browser, that a load of junk gets added to the search term. For example, you search for ‘banana’ and you get something like this:

http://www.google.com.ph/search?q=banana&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a

Well what you’re effectively doing is giving Google a lot of information for free. Which irritates me. All I really need is this,

http://www.google.com.ph/search?q=banana

and if they really want to know more about me, then they’re welcome to go digging through their logs.

OK its a minor irritation, but one that we can fix! I understand that Ubuntu does it as part of a deal with Google, but there’s no reason why we can’t take matters into our own hands and change the defaults.

Read the rest of this entry »

Posted in General IT, Linux | No Comments »

Counting files in subdirectories.

February 23rd, 2009 admin

ze countOK, it sounds simple, and it probably is if you’re sitting at your desktop with Gnome or KDE fired up. However if you’re looking on a server half way across the world, using the command line its not so easy.

There are a number of tools which are useful in finding out things about your filesystem. ls, du, df are three of them, but sometimes they just don’t give you the information you need. In my case I’m backing up a server to a remote location. The script was timing out becase I was trying to back up too many files at once, so I needed to find the number of files in each subdirectory.

Read the rest of this entry »

Posted in General IT, Linux | No Comments »

« Previous Entries
  • Recent Posts

    • ClamAV reporting Outdated version
    • Adventures in unbricking a router
    • One Line Guitar Tuner
    • Captcha Madness
    • Ubuntu upgrade 9.04 to 9.10
  • Sing for your supper

  • Static

    • About
    • Privacy Policy
  • Tags

    apathy apple calendar chkconfig collanos cross-platform eee evolution firmware google grub hotspot id card lightning Linux Mandriva notebook partitioning pclinuxos pclinuxos 2008 Philippines power management re-install sane scanner scheduleworld script Security slow sysv-rc-conf thinkpad thunderbird trust ubuntu ultraportable usb virtualisation vmware vpn wifi wireless workspace sharing xsane yahoo zombie
  • Blogroll

    • Datalude
    • Digital Life
    • Engage the World
  • Archives

    • May 2010
    • April 2010
    • March 2010
    • November 2009
    • October 2009
    • June 2009
    • May 2009
    • April 2009
    • February 2009
    • January 2009
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • April 2008
    • March 2008
    • February 2008

Everything is Broken runs on WordPress. Theme by Bob. All content Copyright © Datalude 2008+.

Bad Behavior has blocked 16 access attempts in the last 7 days.