New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_yubikey() fails with "Access denied (insufficient permissions)", even as root #7

jacobian opened this Issue Mar 3, 2014 · 4 comments


None yet
4 participants
Copy link

jacobian commented Mar 3, 2014

$ sudo python -c 'import yubico; yubico.find_yubikey()'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/jacob/.virtualenvs/hkyubi/lib/python2.7/site-packages/yubico/", line 229, in find_key
    YK = YubiKeyUSBHID(debug=debug, skip=skip)
  File "/Users/jacob/.virtualenvs/hkyubi/lib/python2.7/site-packages/yubico/", line 141, in __init__
    if not self._open(skip):
  File "/Users/jacob/.virtualenvs/hkyubi/lib/python2.7/site-packages/yubico/", line 441, in _open
  File "/Users/jacob/.virtualenvs/hkyubi/lib/python2.7/site-packages/usb/", line 230, in claimInterface
    util.claim_interface(, if_num)
  File "/Users/jacob/.virtualenvs/hkyubi/lib/python2.7/site-packages/usb/", line 191, in claim_interface
    device._ctx.managed_claim_interface(device, interface)
  File "/Users/jacob/.virtualenvs/hkyubi/lib/python2.7/site-packages/usb/", line 112, in managed_claim_interface
    self.backend.claim_interface(self.handle, i)
  File "/Users/jacob/.virtualenvs/hkyubi/lib/python2.7/site-packages/usb/backend/", line 758, in claim_interface
    _check(self.lib.libusb_claim_interface(dev_handle.handle, intf))
  File "/Users/jacob/.virtualenvs/hkyubi/lib/python2.7/site-packages/usb/backend/", line 571, in _check
    raise USBError(_str_error[ret], ret, _libusb_errno[ret])
usb.core.USBError: [Errno 13] Access denied (insufficient permissions)

This is on OS X 10.9 ("Mavericks"), which I believe is important (I've found a few issues related to libusb on 10.9 that sound similar)

I'm running libusb-1.0.18 installed from Homebrew, PyUSB 1.0.0b1 installed from PyPI, and python-yubico 1.2. also installed from PyPI.


This comment has been minimized.

Copy link

dainnilsson commented Mar 4, 2014

This is a known issue with libusb on OSX:
Until this is fixed I don't think there is anything we can do about it, unfortunately.


This comment has been minimized.

Copy link

josepvalls commented Jan 9, 2016

Any idea on how to implement a workaround using HIDAPI as suggested in the linked thread? Doesn't look like the devs will fix it.


This comment has been minimized.

Copy link

fhibler commented Feb 12, 2016

As the "Yubikey Personalization Tool" is working on OSX, there must be some kind of workaround. Any chance this python module gets adapted accordingly?

Or someone is able to have a look into HIDAPI, as suggested in the thread posted above?



This comment has been minimized.

Copy link

dainnilsson commented Feb 12, 2016

YubiKey Personalization Tool doesn't use libusb on OSX, and thus is not affected by this issue. Adding a HIDAPI backend using is probably doable, but would require some effort. Contributions in this area are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment