修改元数据

现在私钥已经被移动到 Yubikey 当中了,也是时候做一些基本的设置了。比如改变默认的管理员 PIN(GPG 中叫做 Admin PIN)和访问私钥时需要的普通 PIN。

  1. gpg --card-edit
  2. gpg/card> admin
  3. Admin commands are allowed
  4. gpg/card> passwd
  5. gpg: OpenPGP card no. detected
  6. 1 - change PIN
  7. 2 - unblock PIN
  8. 3 - change Admin PIN
  9. 4 - set the Reset Code
  10. Q - quit
  11. Your selection? 3
  12. PIN changed.
  13. 1 - change PIN
  14. 2 - unblock PIN
  15. 3 - change Admin PIN
  16. 4 - set the Reset Code
  17. Q - quit
  18. Your selection? 1
  19. PIN changed.
  20. gpg/card> q
  21. gpg/card> login
  22. foobar
  23. gpg/card> sex
  24. m
  25. gpg/card> name
  26. Cardholder\'s surname: Bar
  27. Cardholder\'s given name: Foo
  28. gpg/card> lang
  29. Language preferences: en
  30. gpg/card> login
  31. Login data (account name): foobar
  32. gpg/card> list
  33. gpg/card> quit