Recently I moved all my sites onto a new server. I use Duplicity and Backupninja to perform weekly backups of my server. While configuring backups on the new server, I kept encountering a strange error:

Error: gpg: using "D5673F3E" as default secret key for signing
Error: gpg: signing failed: Inappropriate ioctl for device
Error: gpg: [stdin]: sign+encrypt failed: Inappropriate ioctl for device

It turns out this error is due to changes in GnuPG 2.1, which only recently landed in Debian Testing. The error occurs because GnuPG 2.1 by default ignores passphrases passed in via environment variables or stdin, and is trying to show a pinentry prompt. "Inappropriate ioctl for device" is thrown because the Backupninja script is not running through a TTY, so there's no way to actually render the prompt.

To solve the problem, you need to enable loopback pinentry mode. Add this to ~/.gnupg/gpg.conf:

use-agent
pinentry-mode loopback

And add this to ~/.gnupg/gpg-agent.conf, creating the file if it doesn't already exist:

allow-loopback-pinentry

Then restart the agent with echo RELOADAGENT | gpg-connect-agent and you should be good to go!

Yesterday, I had a hard drive die on me  :(. It was a 160 GB Seagate Barracuda, and was less than a year old. It started with strange error messages late last night. I went to the server, reset it (need to power it off - It wouldn't shutdown cleanly), and now it won't boot. When I try to boot the system, I can hear the drive head hitting against the side of the drive, which makes me think there is a problem internally with the drive...

I'm looking into recovery options, though I think it will be way too expensive for my needs. If it is too expensive, I'll just have to cut my losses and move on. A lot of my development work was on this server (it was my backup PC as well). Whilst I have local copies of stuff, a lot of it is slightly old. It's kinda depressing to have something like this happen, so I'm not really in a good mood at the moment  :(

Update: About two weeks after the hard drive "failed", I tried it again. It was working, but made a strange sound. I quickly copied all the data off of it, and disconnected it. I was able to get a copy of all the most important data. So, it's not so bad... This story has a happy ending :D

I checked my email inbox this morning, and guess what I found? The firewall (ConfigServer Security and Firewall) on a server I help run blocked a brute-force attack from Nokia:

Time: Tue May 1 02:28:18 2007
IP: 63.97.248.34 (machine34.nokia.com)
Failures: 5 (sshd)
Interval: 135 seconds
Blocked: Yes

Log entries:

May 1 02:28:08 blue sshd[9363]: Failed password for root from ::ffff:63.97.248.34 port 56057 ssh2
May 1 07:28:08 blue sshd[9364]: Failed password for root from ::ffff:63.97.248.34 port 56057 ssh2
May 1 02:28:11 blue sshd[9368]: Failed password for root from ::ffff:63.97.248.34 port 56436 ssh2
May 1 07:28:11 blue sshd[9369]: Failed password for root from ::ffff:63.97.248.34 port 56436 ssh2
May 1 02:28:13 blue sshd[9370]: Failed password for root from ::ffff:63.97.248.34 port 56591 ssh2

Just thought it was funny :P
(oh yeah, and I will report it to them!)

This tutorial will show you how to set up a serial console on a Linux system, and connect to it via a null modem cable. This is quite useful if your Linux server is in a headless configuration (no keyboard or monitor), as it allows you to easily get a console on the system if there are any problems with it (especially network problems, when SSH is not available). In the end, the GRUB menu will appear over the serial link, as will the bootup messages (output when booting the system). I'm using Debian Etch on the server and Ubuntu Edgy on my client, although this should work on any Linux distribution.

Read more ⇒

The other day, I was looking for an easy way to restore a MySQL dump (or backup, whatever you like to call it) in PHP. I've previously used a segment of the code from PHP MySQL Backup V 2.2 for this, but it didn't seem to support FULLTEXT indicies that well. So, I searched around, but couldn't find anything. I even asked on the PHP IRC channel, and they suggested to use shell_exec to call mysql (unfortunately, I've disabled shell_exec for security reasons). Looking closer, I noticed that this was actually quite easy to do.

Read more ⇒

In this tutorial, I'll show you how to install Linux-Vserver on Debian Testing (Etch), the easy way. This was the first tutorial I posted to HowtoForge.com, so please tell me if you like it or not. You may find it a bit verbose, as I try to explain things in enough detail so that everyone understands what I mean :-)

What is Linux-Vserver, you ask? It's simple. Basically, Linux-Vserver is an open-source system used to separate a single physical server into multiple virtual servers. From the Linux-Vserver website:

"Linux-VServer allows you to create virtual private servers and security contexts which operate like a normal Linux server, but allow many independent servers to be run simultaneously in one box at full speed. All services, such as ssh, mail, Web, and databases, can be started on such a VPS, without modification, just like on any real server. Each virtual server has its own user account database and root password and doesn't interfere with other virtual servers."

Read more ⇒

Update: Since I made this post in September 2006, things have changed. Compiz-Quinn has changed its name to Beryl, and up-to-date installation instructions are available for Ubuntu Edgy and Ubuntu Feisty

Well, I got my laptop on Friday (15th September). I must say, the Inspiron 6400 was definately a good choice. The only thing I don't really like about it is the reflectiveness of the TrueLife screen, but I suppose I'll get used to it (the colours are definately more vivid, and it has better contrast... The screen looks absolutely awesome when playing games!). Anyways, one of the first things I did was partition the drive, and install Ubuntu Linux :). Once I did this, the first thing I did was install i8kutils and Gkrellm (so that I could control the speed of the fan, to make sure it doesn't overheat), and then install the ATI Drivers for the X1400 (called 'FGLRX'). Everything was working excellently (see screenshot)
Desktop screenshot

After everything was done, I thought about what to install. I remember my friend telling me about something called 'Compiz', but I couldn't remember how to install it. After searching for a while, I found a nice tutorial on installing GLX/Compiz. It appeared to be quite easy to do, so I followed the instructions on the tutorial. And, it works perfectly! :D It comes with heaps of themes, and there are some similar to the upcoming Windows Vista. Take a look at this:
Compiz screenshot 1
Look at the title bar of the 'Home Directory' window. That's called a 'glass effect', and is quite nice...

Another thing implemented in Compiz is window transparency: You can make a window semi-transparent. For example, look at this screenshot of my home directory on top of Opera (with the Google site open). I've faded the window out a bit, so it's partially transparent:
Compiz screenshot 2 - transparency
Nice, huh? Yet another thing in Compiz is multiple desktops. Sure, Linux has support for multiple workplaces in-built (the selector on the bottom-right hand side of Gnome). However, Compiz improves on it vastly, making all the virtual desktops into one large cube:
Compiz screenshot 3 - Cube
I thought the cube was interesting, but something really interesting is if you run VMWare in fullscreen mode. You can make it appear as if you're running multiple operating systems at once... Take a look:
Compiz screenshot 4 - VMWare

In addition to all of this, Compiz has heaps of other effects which I couldn't take screenshots of (including wobbly windows - windows wobble as you drag them, windows 'zoom in' when you start a program, and 'zoom out' when you exit it, and a lot more)... If you'd like to get Compiz working, and have an ATI graphics card, first get the ATI Linux drivers (FGLRX) working (see http://wiki.cchtml.com/index.php/Ubuntu_Dapper_Installation_Guide for a tutorial. Make sure you follow the second bit of the tutorial, to install version 8.28.8). Then, follow the Compiz tutorial, as found at http://www.compiz.net/topic-389-1.html (I followed the second howto, as I personally think it's better to have Compiz as a seperate session... Have fun! :)

Anyways, I think this is probably the longest blog post I've written, ever :P

Well, I was working on my Linux testing server, and it stopped working for some reason... I tried to restart, but the computer wouldn't even boot (even from a CD). Upon unplugging all the IDE devices, and only leaving a CD drive in (a different one, in case it was faulty for whatever reason), it still wouldn't boot :(. I guess I won't be using that for a while...

Anyways, I'm buying a new server on eBay, so it isn't that bad (all I need to do is wait for it to get shipped to me).

Old server:

  • Celeron 300 MHz
  • 4.3GB Quantum Fireball lct and 4.3GB Seagate hard drives
  • 48X CD-ROM drive
  • 192MB membory

New server:

  • Pentium III 650 MHz
  • 8.4 GB hard drive
  • 48X CD-ROM drive
  • 256MB membory

Don't say that it isn't that powerful... Linux makes any computer look powerful :D. Besides, it's only a server for testing stuff.

EDIT: Computer arrived today, 30th June 2006. That company on eBay was quick!