Tag Archives: Linux

Two-factor authentication for ownCloud using one-time passwords (OTP) from Yubikey

Yubikey NEO

NFC-enabled Yubikey NEO (source: Wikipedia)

I’ve been the proud owner of a Yubikey NEO for a couple of months now. It’s a small USB device (smaller than most USB flash drives) that identifies itself as a USB keyboard. Upon pressing the integrated button, the Yubikey generates a one-time password (OTP) following the popular HOTP standard (RFC4226), and sends it to your computer. Because it acts like a USB keyboard, the password is typed in for you. Chances are that it will be hidden by stars/dots of a password field, and you’ll never even see the password! Many applications support one-time passwords, this tutorial describes a method of using the Yubikey with ownCloud – a popular web service that allows you manage your files, contacts, and calendar in your own cloud (read: webserver). A bit like DropBox or Google Drive, but without handing your data over to big multinationals.

Continue reading

Creating a simple Debian (.deb) package based on a directory structure

Sometimes you just want a quick way of installing a piece of software on multiple Debian (or Debian-based, e.g. Ubuntu) systems. Maybe a set of maintenance scripts you wrote (don’t we all?), or a binary you found somewhere. In those cases, it feels like quite a burden to use dpkg-buildpackage: the only thing you need is for a directory structure to go into a .deb archive, with some additional metadata. Here’s how you do that.
Continue reading

Manually running KVM on Ubuntu 12.10 (without virt-manager c.s.)

Did you have a running bridged networking KVM setup on your previous Ubuntu installation, but are things no longer working for you under Ubuntu 12.10 (Quantal)? Do you get:

/etc/kvm/kvm-ifup: could not launch network script
kvm: -net tap,vlan=0: Device ‘tap’ could not be initialized

Although it might be easier to start using virt-manager and friends to manage your virtual machines, a quick way to get things running again is simply create /etc/kvm/kvm-ifup with the following contents:


switch=$(ip route ls | awk ‘/^default / { for(i=0;i

Don’t forget to make it executable:

chmod a+rx /etc/kvm/kvm-ifup

And you’re ready to go! For more information about manually running KVM, please see the following documentation page on Ubuntu.com: https://help.ubuntu.com/community/KVM/Directly.

Replicating a Subversion repository into a subtree of another repository without admin access

A couple of months ago, I felt the need to replicate (a part of) a colleague’s Subversion repository. We were working on a rather large project and I wanted to have the exact revisions on my own SVN server as well. Just in case I need some history information in a couple of years, and also to be able to use my own patched WebSVN to browse the repository, publish an rss feed and keep track of changes. You’d think someone else has done this before. That turned out to be a false assertion – at least, in this particular case.
Continue reading