Kaijanmaki.net

“People said I should accept the world. Bullshit! I don't accept the world.'' –rms

My Amazon.com Wish List

Licensed under CC-BY-SA 3.0

2011-09-12

Joining Canonical

Filed under: Canonical,News,personal,ubuntu — Tags: — Antti Kaijanmäki @ 12:02

As of today I’m Software Engineer at Canonical.

wheeee… 8)

2010-02-15

USB_ModeSwitch and Ubuntu 10.04

Filed under: ubuntu — Antti Kaijanmäki @ 12:51

In contrariety what I wrote in the past Ubuntu 9.10 didn’t ship with usb_modeswitch after all. I don’t know why it was not included, but anyway Timo Jyrinki is now trying to stir up some discussion to get usb_modeswitch included in Ubuntu 10.04.

I also wanted to give him a hand, so I wrote to USB_ModeSwitch forums hoping that something could come out of this. I only wish I had time to work on this my self, but as always, I don’t.

2009-12-18

Canon MP600 and Color Printing

Filed under: Proprietary Crap,ubuntu — Antti Kaijanmäki @ 17:50

My father bought a Canon PIXMA MP600 all-in-one printer. Unfortunately he didn’t consult me first as he has a PC with Ubuntu Hardy provided by me. I would never had let him by anything from Canon. Linux support for their devices has been next to nonexistent in the past. Fortunately there’s a (little) change in the situation as Canon is now providing proprietary linux drivers. They have both rpm and deb packages for most of their drivers, but the download sites don’t always list them even if they are available. Sadly Google does alot better job for finding the drivers from Canon’s site.

Anyway my father had a problem. He could not take colored prints as the colors were horribly misaligned. I investigated the problem just to notice that others had problems with color printing, too, and I was almost ready to give up (after a long long search and many tender thoughts on Canon). Then I just had an idea; let’s try using lower resolution. I lowered the print resolution from 600×600 dpi to 300×300 dpi and voilà the colored print came out just like it should!

I quickly updated the OpenPrinting database entry of the printer and decided to blog about this in hope that others who are giving some rough love with head to their desks can also benefit from this information.

God, I hate proprietary drivers. And Canon.

2009-10-26

Recovering Files From eCryptfs Encrypted Home

Filed under: FLOSS,ubuntu — Tags: , — Antti Kaijanmäki @ 10:50

update 2010-08-10: It seems that the directory structure has changed in new Ubuntu releases. See comment #31. The information in this posting seems to be outdated in newer installations, so I recommend anyone seeking how to manually restore encrypted data to turn to help.ubuntu.com manual.

Last weekend I had to recover an eCryptfs encrypted home directory created with ubuntu jaunty installer from a backup. I thought that it would go smoothly, after all I had written down the recovery passphrase when I installed the system some time a go. Well, it wasn’t all that smooth.

After like 1,5 hours or so I finally had the backup decrypted and I thought that it would be useful to others, too, if I share my findings as I discovered from emergency googling that others are struggling from the same problem and no one has provided any complete solution.

The backup was on external USB HDD, but it should not matter as long as you have your old encrypted .Private somewhere at hand.

First you need to make sure ecryptfs-utils is installed:

$ sudo aptitude install ecryptfs-utils

Create a directory where the backup is opened:

$ cd /mnt
$ sudo mkdir OldHome

Then create a symbolic link to your backup of your old .Private:

$ sudo ln -s /media/3e8ea0ac-xxxx-xxxx-a35a-8ff17406fdb8/home/user/.Private OldPrivate

Now, here’s the part that was missing from all the instructions. At least Ubuntu is using filename encryption to hide the real filenames. You need two keys for accessing: one for accessing the file content and one to decrypt the filenames to be meaningful. To get the key do:

$ sudo ecryptfs-add-passphrase --fnek
Passphrase:

Enter the recovery passphrase: the long one you had to manually write down to a piece of paper when you installed the system. Then you should have a similar output as the following:

Inserted auth tok with sig [xxxxxxxxxxxxxxx] into the user session keyring
Inserted auth tok with sig [yyyyyyyyyyyyyyyy] into the user session keyring

Now, write down the second signature [yyyyyyyyyyyyyyyy].

Now you are ready to decrypt the backup:

$ sudo mount -t ecryptfs OldPrivate OldHome/
Passphrase:
Select cipher:
1) aes: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
2) blowfish: blocksize = 16; min keysize = 16; max keysize = 56 (not loaded)
3) des3_ede: blocksize = 8; min keysize = 24; max keysize = 24 (not loaded)
4) twofish: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
5) cast6: blocksize = 16; min keysize = 16; max keysize = 32 (not loaded)
6) cast5: blocksize = 8; min keysize = 5; max keysize = 16 (not loaded)
Selection [aes]:
Select key bytes:
1) 16
2) 32
3) 24
Selection [16]:
Enable plaintext passthrough (y/n) [n]:
Enable filename encryption (y/n) [n]: y
Filename Encryption Key (FNEK) Signature [xxxxxxxxxxxxxxx]: yyyyyyyyyyyyyyyy
Attempting to mount with the following options:
ecryptfs_unlink_sigs
ecryptfs_fnek_sig=yyyyyyyyyyyyyyyy
ecryptfs_key_bytes=16
ecryptfs_cipher=aes
ecryptfs_sig=xxxxxxxxxxxxxxx
WARNING: Based on the contents of [/root/.ecryptfs/sig-cache.txt],
it looks like you have never mounted with this key
before. This could mean that you have typed your
passphrase wrong.

Would you like to proceed with the mount (yes/no)? : yes
Would you like to append sig [df3c98e4c85db0c5] to
[/root/.ecryptfs/sig-cache.txt]
in order to avoid this warning in the future (yes/no)? : no
Not adding sig to user sig cache file; continuing with mount.
Mounted eCryptfs

Now you are able to access the decrypted backup in OldHome directory and you also have correct filenames.