当我插入 Yubikey 时没有 /dev/hidraw 设备

Sam*_*ann 5 usb debian udev

我有一个 Yubikey NEO,我正试图让它在 Debian 上运行。

当我插入它时,我得到 udev 事件,但没有 /dev/hidraw? 设备。

以下是我目前所知道的:

cat /boot/config-$(uname -r) | grep CONFIG_HIDRAW) 给出:

CONFIG_HIDRAW=y
Run Code Online (Sandbox Code Playgroud)

lsusb -v -d 1050:0211 给出:

Bus 002 Device 013: ID 1050:0211 Yubico.com 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1050 Yubico.com
  idProduct          0x0211 
  bcdDevice            0.20
  iManufacturer           1 Yubico
  iProduct                2 Yubico WinUSB Gnubby (gnubby1)
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower               30mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)
Run Code Online (Sandbox Code Playgroud)

如果我在udevadm monitor插入时运行然后拔下 Yubikey,我会得到:

monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[7941.975349] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
KERNEL[7941.975583] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
UDEV  [7941.985350] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
UDEV  [7942.998352] add      /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
KERNEL[7945.487692] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
KERNEL[7945.487791] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
UDEV  [7945.488139] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2/2-1.2:1.0 (usb)
UDEV  [7945.488620] remove   /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.2 (usb)
Run Code Online (Sandbox Code Playgroud)

我已经添加了 udev 规则,正如这里推荐的那样,并cat /etc/udev/rules.d/70-u2f.rules给出:

ACTION!="add|change", GOTO="u2f_end"

#KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1050", TAG+="uaccess"
ATTRS{idVendor}=="1050", GROUP="plugdev", MODE="0660"


LABEL="u2f_end"
Run Code Online (Sandbox Code Playgroud)

(当注释行被取消注释时,这也不起作用。)

我试过安装libhidapi-hidraw0,但这似乎也不起作用。

我还尝试安装和运行 Yubikey NEO 管理器,但它和 yubikey 个性化工具都认为没有插入任何 Yubikey 设备,这就是为什么我认为阻止程序是缺少 /dev/hidraw0 设备(或类似水平的东西)。

我已经达到了我对 Linux 的了解和通过 Google 搜索解决方案的能力的极限,因此进一步的调试建议和(如果您知道)解决方案都会有所帮助。

小智 1

您必须小心从哪里获得 Yubikey,因为一些二手的 Yubikey 来自 Google 的测试团队。这些不适用于当前版本的 NEO 管理器或个性化工具。

0x02xx 设备是测试设备。

如果您向 yubikey 支持寻求帮助,并提供设备 ID,以及您如何从个人经验中获取所述设备(可能是 eBay),他们将愿意免费 RMA 您的设备,并自费给您寄一个新设备。您的结果可能会有所不同。

祝你好运!