Я следовал этому учебнику до того момента, когда PAM запрашивает мою смарт-карту и прикрепляет к sudo -i
, но затем он говорит
Smart card PIN:
DEBUG:pkcs11_lib.c:1405: login as user CKU_USER
DEBUG:pkcs11_lib.c:1599: Saving Certificate #1:
DEBUG:pkcs11_lib.c:1601: - type: 00
DEBUG:pkcs11_lib.c:1602: - id: 00
DEBUG:pkcs11_lib.c:1599: Saving Certificate #2:
DEBUG:pkcs11_lib.c:1601: - type: 00
DEBUG:pkcs11_lib.c:1602: - id: 00
DEBUG:pkcs11_lib.c:1599: Saving Certificate #3:
DEBUG:pkcs11_lib.c:1601: - type: 00
DEBUG:pkcs11_lib.c:1602: - id: 00
DEBUG:pkcs11_lib.c:1634: Found 3 certificates in token
DEBUG:mapper_mgr.c:172: Retrieveing mapper module list
DEBUG:mapper_mgr.c:73: Loading static module for mapper 'pwent'
DEBUG:mapper_mgr.c:196: Inserting mapper [pwent] into list
DEBUG:pam_pkcs11.c:578: verifying the certificate #1
verifying certificate
DEBUG:cert_vfy.c:416: Neither CA nor CRL check requested. CertVrfy() skipped
DEBUG:mapper_mgr.c:306: Mapper module pwent match() returns 0
DEBUG:pam_pkcs11.c:661: certificate is valid but does not match the user
DEBUG:pam_pkcs11.c:578: verifying the certificate #2
verifying certificate
DEBUG:cert_vfy.c:416: Neither CA nor CRL check requested. CertVrfy() skipped
DEBUG:mapper_mgr.c:306: Mapper module pwent match() returns 0
DEBUG:pam_pkcs11.c:661: certificate is valid but does not match the user
DEBUG:pam_pkcs11.c:578: verifying the certificate #3
verifying certificate
DEBUG:cert_vfy.c:416: Neither CA nor CRL check requested. CertVrfy() skipped
DEBUG:mapper_mgr.c:306: Mapper module pwent match() returns 0
DEBUG:pam_pkcs11.c:661: certificate is valid but does not match the user
ERROR:pam_pkcs11.c:673: no valid certificate which meets all requirements found
Error 2336: No matching certificate found
DEBUG:mapper_mgr.c:213: unloading mapper module list
DEBUG:mapper_mgr.c:137: calling mapper_module_end() pwent
DEBUG:mapper_mgr.c:148: Module pwent is static: don't remove
DEBUG:pkcs11_lib.c:1465: logout user
DEBUG:pkcs11_lib.c:1472: closing the PKCS #11 session
DEBUG:pkcs11_lib.c:1478: releasing keys and certificates
На карте есть несколько X. 509 сертификатов и несколько ключей RSA, которые мне нужно сохранить. Как я могу сказать PAM, что текущие ключи - это то, что я хочу, как мой пользователь?
Также cd /etc/pam_pkcs11/cacerts
sudo pkcs11_make_hash_link
не смог найти скрипт, и когда я вручную создал его из github, он обнаружил, что только сам обнаружил, таким образом, бросил ошибка