Dec
06
How to manage a card reader and the FSFE crypto card
Just after 15 days I’m publishing a second English tutorial. This time I’ll speak about the Fellowship crypto card and how to make it work with a card reader (don’t you know what I’m talking about? Read this page about the fsfe card).
There are some nice tutorials around the net, I assembled them and there you will find how to install a card reader (in this case the famous SCR335) under Ubuntu, but it should work with every distro which uses Udev.
With this tutorial, you will be able to access your smart card reader without being root!
This tutorial is COPY & PASTE capable, if you don’t want to read all the comments, you can just copy and past these commands in your terminal, it should work without adjustments
EDIT: you don’t need pcscd/libpcsclite-dev, I would really thank Michael Kallas and Matthias Kirschner for their help!
First, install libusb-dev:
sudo apt-get install libusb-dev
I reccommend to install pcsc for accessing the card reader:
sudo apt-get install pcsc-tools pcscd
Now we need to set up the Udev rules and scripts, for accessing the usb card reader.
Download gnupg-ccid.rules in the right dir:
cd /etc/udev/
sudo wget http://www.fsfe.org/en/content/download/17665/125518/file/gnupg-ccid.rules
Download gnupg-ccid in the scripts dir:
cd /etc/udev/scripts/ (create it if it doesn’t exists)
sudo wget http://www.fsfe.org/en/content/download/17248/121800/file/gnupg-ccid
We need to set the correct permissions and a symbolic link:
sudo chmod +x /etc/udev/scripts/gnupg-ccid
sudo ln -s /etc/udev/gnupg-ccid.rules /etc/udev/rules.d/gnupg-ccid.rules
All the configuration files are in the right place and with the right permissions by now.
You will now create a group scard, give this group permission to access the smart card reader, and include the users who should have access to the card reader to this group.
sudo addgroup scard
sudo addgroup $USER scard
If $USER doesn’t work, replace it with your user login name.
Then create the file /etc/udev/rules.d/smart_card.rules using this command (thanks to gerloff)
cd /etc/udev/rules.d/
sudo wget http://stats.graziotin.net/download.php?id=9
Install libpcslite-dev (you need it because of some Udev problems)
sudo apt-get install libpcsclite-dev
Restart the system. You can verify the correct installation of the card reader with:
gpg –card-status
I hope you will find this tutorial useful
Credits:
- FSFE’s Tutorial:Setting up your card reader on GNU/Linux (udev)
- A gerloff’s comment on that page
- The GnuPG FSFE card tutorial


December 19th, 2006 at 0:33 am
As long as you use pcscd, you don’t need to do anything to udev as far as I remember. But not all functions were working with that setup, that’s why for creating keys on the card you need to remove pcscd. (At least that was true the last time I checked…)
December 19th, 2006 at 11:03 am
I agree with Michael; every time I checked I had only problems with pcscd. And Werner’s first question when fixing was always “is pcscd running? If yes, please kill it”.
So in most cases, especially with the SCR 335, it should work better without PCSCD.
If you have problems with the GnuPG Smartcard Howto or suggestions please report them to gnupg-devel@gnupg.org.
December 19th, 2006 at 11:24 am
Really thanks for the comments! I wrote this just because it works for me with this configuration. Let me try to uninstall pcscd, and if this works, I’ll update the how-to
December 19th, 2006 at 11:39 am
Yes it works! Really thanks for the hints!
December 22nd, 2006 at 22:19 pm
I’m running Debian Sarge 2.6.8-2-386 with some backports:
gnupg/sarge-backports uptodate 1.4.6-1~bpo.1
I cannot get access to the card as a user with with the scard group without pcscd/libccsid installed. But since I currently don’t have access to my admin key I can’t report of any other problems. I’ve hacked my udev script to log things to /tmp but it seems that the scripts actually never get executed.
December 22nd, 2006 at 23:38 pm
I’m running Debian sid 2.6.19-beyond2 (the last vanilla kernel with beyond patches), and everything works fine. Please note that the Udev rules (the gerloff’s rules) in this post are written for the SCR335 card reader..
November 29th, 2007 at 0:11 am
Hi.
Good design, who make it?
November 29th, 2007 at 4:40 am
http://daniel.graziotin.net/stats/download.php?id=9 does no longer work, please provide the file content or a valid download link.
November 30th, 2007 at 21:49 pm
@naisioxerloro
look at the bottom of this page, you will see wo designed this theme
@nursoda
Thank you, I’ve just corrected the link (btw it’s this one: http://stats.graziotin.net/download.php?id=9)