smart card + gpg only root
Werner Koch
wk at gnupg.org
Wed Jul 20 16:55:23 CEST 2005
On Wed, 20 Jul 2005 16:27:04 +0200, Federico Munerotto said:
> if the device is unplugged and then plugged again, belongs again to the
> root group and isn't writable again (change its location). I need to set
> up hotplug to
> 1. chgrp to the proper group
> 2. chmod +rw scard
> the file that is created.
You needs to debug the hotplug script. Here are the scripts I am
using:
-------------- next part --------------
# The entries below are used to detect CCID devices and run a script
#
# USB_MATCH_VENDOR 0x0001
# USB_MATCH_PRODUCT 0x0002
# USB_MATCH_DEV_LO 0x0004
# USB_MATCH_DEV_HI 0x0008
# USB_MATCH_DEV_CLASS 0x0010
# USB_MATCH_DEV_SUBCLASS 0x0020
# USB_MATCH_DEV_PROTOCOL 0x0040
# USB_MATCH_INT_CLASS 0x0080
# USB_MATCH_INT_SUBCLASS 0x0100
# USB_MATCH_INT_PROTOCOL 0x0200
#
# script match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi
# bDeviceClass bDeviceSubClass bDeviceProtocol
# bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info
#
# flags V P Bl Bh Clas Sub Prot Clas Sub Prot Info
gnupg-ccid 0x0080 0x0 0x0 0x0 0x0 0x00 0x00 0x00 0x0B 0x00 0x00 0x00000000
# SPR532 is CCID but without the proper CCID class
gnupg-ccid 0x0003 0x04e6 0xe003 0x0 0x0 0x00 0x00 0x00 0x0B 0x00 0x00 0x00000000
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnupg-ccid
Type: test/plain
Size: 724 bytes
Desc: not available
Url : /pipermail/attachments/20050720/076ad6a6/gnupg-ccid.bin
-------------- next part --------------
$ ls -l /etc/hotplug/usb/gnupg*
-rwxr-xr-x 1 root root 724 Sep 22 2004 /etc/hotplug/usb/gnupg-ccid
-rw-r--r-- 1 root root 865 Mar 16 16:08 /etc/hotplug/usb/gnupg-ccid.usermap
Remember to chmod +x gnupg-ccid. I use the group wk instead of scard,
so you need to change that.
Does this help?
Salam-Shalom,
Werner
More information about the Gnupg-users
mailing list