Yubico / yubico-piv-tool

Command line tool for the YubiKey PIV application
https://developers.yubico.com/yubico-piv-tool
BSD 2-Clause "Simplified" License
299 stars 99 forks source link

default management key does not work after reset #495

Open rkiel-attenti opened 4 months ago

rkiel-attenti commented 4 months ago

Hello world I have a new out-of-the-box Yubikey 5 NFC:

XXX:~/$ yubico-piv-tool -astatus Version: 5.7.1 Serial Number: XYZXYZ CHUID: No data available CCC: No data available PIN tries left: 3

I'm trying to change PIN retries number (or actually any other command) and it fail the authentication

XXX:~/$ yubico-piv-tool -apin-retries --pin-retries=10 --puk-retries=10 Failed authentication with the application.

The ykman behaves the same way:

XXX:~/$ ykman piv set-pin-retries 10 10 Enter PIN: <- 123456 was given Enter a management key [blank to use default key]: <- blank was given Usage: ykman piv set-pin-retries [OPTIONS] PIN-RETRIES PUK-RETRIES Try 'ykman piv set-pin-retries -h' for help.

Error: Authentication with management key failed.

I have not changed the PIN/PUK or management key. With ykman, when I give the wrong PIN (not 123456) it says the PIN is wrong. I have tried to perform the reset and the result is the same.

What is wrong?

Thanks

dainnilsson commented 4 months ago

Can you check the following:

rkiel-attenti commented 4 months ago

OS: Ubuntu 20.04.6 LTS

ykman --version YubiKey Manager (ykman) version: 3.1.1 Libraries: libykpers 1.20.0 libusb 1.0.23

ykman piv info PIV version: 5.7.1 PIN tries remaining: 3 CHUID: No data available. CCC: No data available.

Thank you for your help

dainnilsson commented 4 months ago

You're using a very old version of ykman that isn't compatible with the latest YubiKeys. The current version is 5.5.1 and is available here: https://github.com/Yubico/yubikey-manager

rkiel-attenti commented 4 months ago

Thank you very much. I will try