GnuPG Smartcard on Debian Sarge

There's a document on the GnuPG explaining how to set up your system to use a smartcard. There a few people around claiming that it works on a standard Debian Sarge by using udev. Up to today I have had no luck with that however, but that finally changed!

I'll skip narrating all the thing I tried in vain, including compiling new kernels from backports.org. So if you happen to have an SCM Microsystems SCR335 smartcard reader (which is listed on the HOWTO as supported) like me this should get it to work.

Packages you'll have to install:

Everything else will come in as a dependency.

After that you also need a file in /etc/udev/rules.d/gnnupg-ccid.rules and no, don't use the one they suggest in the HOWTO. This one line is much better as it doesn't need the speparate script (and actually works!):

BUS=="usb", ENV{ACTION}=="add", SYSFS{idVendor}=="04e6", SYSFS{idProduct}=="5115", GROUP="users", MODE="0660"

Note the ENV bit. You'll have to adjust the SYSFS values if you have a different reader. Lastly there's the GROUP and MODE to play with, I really don't see why you need to create yet another group for this. Why wouldn't all users be allowed to use a smartcard?

Now you should have the green led on the reader on when you insert the card. And gpg --card-status should give you output too. Start playing.

If you find any errors in the above (I missed a required package or so) please tell me and I'll update the description.