importlib not available in python 2.6
importlib is not availbale in python 2.6, so we need to dynamically import the application modules in another way!

diff --git a/privacyidea/lib/tokens/yubikeytoken.py b/privacyidea/lib/tokens/yubikeytoken.py
index 8c278e2e..1eaf0f1c 100644
--- a/privacyidea/lib/tokens/yubikeytoken.py
+++ b/privacyidea/lib/tokens/yubikeytoken.py
@@ -205,8 +205,6 @@ class YubikeyTokenClass(TokenClass):
         # The variable otp val is the last 32 chars
         yubi_otp = anOtpVal[-32:]
 
-        # TODO: We can also check the PREFIX! At the moment, we do not use it!
-
         try:
             otp_bin = modhex_decode(yubi_otp)
         except KeyError:
@@ -252,6 +250,11 @@ class YubikeyTokenClass(TokenClass):
             tokenid = uid
             self.add_tokeninfo("yubikey.tokenid", tokenid)
 
+        prefix = self.get_tokeninfo("yubikey.prefix")
+        if not prefix:
+            log.debug("Got no prefix for %r. Setting to %r." % (serial, yubi_prefix))
+            self.add_tokeninfo("yubikey.prefix", yubi_prefix)
+
         if tokenid != uid:
             # wrong token!
             log.warning("The wrong token was presented for %r. Got %r, expected %r."
@@ -379,29 +382,23 @@ h={h}
         res = False
 
         token_list = []
+        token_candidate_list = []
 
         # strip the yubico OTP and the PIN
-        modhex_serial = passw[:-32][-16:]
-        try:
-            serialnum = "UBAM" + modhex_decode(modhex_serial)
-        except TypeError as exx:  # pragma: no cover
-            log.error("Failed to convert serialnumber: %r" % exx)
-            return res, opt
-
-        # build list of possible yubikey tokens
-        serials = [serialnum]
-        for i in range(1, 3):
-            serials.append("%s_%s" % (serialnum, i))
+        prefix = passw[:-32][-16:]
 
         from privacyidea.lib.token import get_tokens
         from privacyidea.lib.token import check_token_list
-        for serial in serials:
-            tokenobject_list = get_tokens(serial=serial)
-            token_list.extend(tokenobject_list)
+
+        token_candidate_list = get_tokens(tokentype='yubikey')
+        for tokenobject in token_candidate_list:
+            token_prefix = tokenobject.get_tokeninfo("yubikey.prefix")
+            if prefix == token_prefix:
+                token_list.append(tokenobject)
 
         if not token_list:
-            opt['action_detail'] = ("The serial %s could not be found!" %
-                                    serialnum)
+            opt['action_detail'] = ("The prefix %s could not be found!" %
+                                    prefix)
             return res, opt
 
         (res, opt) = check_token_list(token_list, passw)
diff --git a/privacyidea/static/components/token/views/token.enroll.yubikey.html b/privacyidea/static/components/token/views/token.enroll.yubikey.html
index d6beb467..6bd598aa 100644
--- a/privacyidea/static/components/token/views/token.enroll.yubikey.html
+++ b/privacyidea/static/components/token/views/token.enroll.yubikey.html
@@ -2,6 +2,9 @@
     The Yubikey Token is an USB device that emits an event based One Time
     Password. You can initialize the Yubikey using the tool ykpersonalize.
     Paste the secret hex key here.
+    For tokens compatible with the Yubico cloud service check "emit a public ID".
+    When programming the token the prefix must be 6 bytes, which will give
+    you a UID with 12 characters.
     You also need to choose, if the Yubikey emits the additional UID, which
     is either 12 or 16 characters long. You can check this in the test field.
 </p>
['privacyidea/static/components/token/views/token.enroll.yubikey.html', 'privacyidea/lib/tokens/yubikeytoken.py']