On pe, 24 helmi 2017, Oucema Bellagha wrote:
while I'm trying to add an ipa token to freeipa server: ipa 
otptoken-add-yubikey --slot=2
I got the following error:

ipa: ERROR: non-public: ValueError: No backend available
Traceback (most recent call last):
 File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 137, in execute
   result = self.Command[_name](*args, **options)
 File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 449, in 
__call__
   return self.__do_call(*args, **options)
 File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 477, in 
__do_call
   ret = self.run(*args, **options)
 File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 800, in run
   return self.forward(*args, **options)
 File "/usr/lib/python2.7/site-packages/ipaclient/plugins/otptoken_yubikey.py", 
line 120, in forward
   yk = yubico.find_yubikey()
 File "/usr/lib/python2.7/site-packages/yubico/yubikey.py", line 229, in 
find_key
   YK = YubiKeyUSBHID(debug=debug, skip=skip)
 File "/usr/lib/python2.7/site-packages/yubico/yubikey_usb_hid.py", line 165, 
in __init__
   if not self._open(skip):
 File "/usr/lib/python2.7/site-packages/yubico/yubikey_usb_hid.py", line 447, 
in _open
   usb_device = self._get_usb_device(skip)
 File "/usr/lib/python2.7/site-packages/yubico/yubikey_usb_hid.py", line 497, 
in _get_usb_device
   find_all=True, idVendor=_YUBICO_VID)]
 File "/usr/lib/python2.7/site-packages/usb/core.py", line 864, in find
   raise ValueError('No backend available')
ValueError: No backend available
ipa: ERROR: an internal error has occurred

how can I fix this?
Install actual libusb package?

pyusb is designed to work against various usb library implementations.
In Fedora there are at least two: libusbx and libusb. Install one of
them.

What the following small python script does return on your system?

------
from usb.libloader import locate_library
print locate_library(('usb-1.0', 'libusb-1.0', 'usb'))
print locate_library(('usb-0.1', 'libusb-0.1', 'usb'))
-------


--
/ Alexander Bokovoy

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to