{"action":"opened","issue":{"url":"https://api.github.com/repos/Yubico/yubico-pam/issues/100","repository_url":"https://api.github.com/repos/Yubico/yubico-pam","labels_url":"https://api.github.com/repos/Yubico/yubico-pam/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/Yubico/yubico-pam/issues/100/comments","events_url":"https://api.github.com/repos/Yubico/yubico-pam/issues/100/events","html_url":"https://github.com/Yubico/yubico-pam/issues/100","id":158591105,"number":100,"title":"Yubikey pam error when using challenge-response","user":{"login":"Carlgo11","id":3535780,"avatar_url":"https://avatars.githubusercontent.com/u/3535780?v=3","gravatar_id":"","url":"https://api.github.com/users/Carlgo11","html_url":"https://github.com/Carlgo11","followers_url":"https://api.github.com/users/Carlgo11/followers","following_url":"https://api.github.com/users/Carlgo11/following{/other_user}","gists_url":"https://api.github.com/users/Carlgo11/gists{/gist_id}","starred_url":"https://api.github.com/users/Carlgo11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carlgo11/subscriptions","organizations_url":"https://api.github.com/users/Carlgo11/orgs","repos_url":"https://api.github.com/users/Carlgo11/repos","events_url":"https://api.github.com/users/Carlgo11/events{/privacy}","received_events_url":"https://api.github.com/users/Carlgo11/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-06T02:39:12Z","updated_at":"2016-06-06T02:39:12Z","closed_at":null,"body":"Hello,\r\nI tried to set up my yubikey to pam. When using the `client` mode it works but when using `challenge-response` I get the following output half of the time.\r\n```\r\ncarl@ubuntu:~$ sudo -i\r\n[../pam_yubico.c:parse_cfg(761)] called.\r\n[../pam_yubico.c:parse_cfg(762)] flags 32768 argc 8\r\n[../pam_yubico.c:parse_cfg(764)] argv[0]=try_first_pass\r\n[../pam_yubico.c:parse_cfg(764)] argv[1]=authfile=/etc/yubikey_mappings\r\n[../pam_yubico.c:parse_cfg(764)] argv[2]=chalresp_path=/var/yubico\r\n[../pam_yubico.c:parse_cfg(764)] argv[3]=debug\r\n[../pam_yubico.c:parse_cfg(764)] argv[4]=id=[REMOVED]\r\n[../pam_yubico.c:parse_cfg(764)] argv[5]=key=[REMOVED]\r\n[../pam_yubico.c:parse_cfg(764)] argv[6]=mode=challenge-response\r\n[../pam_yubico.c:parse_cfg(764)] argv[7]=debug\r\n[../pam_yubico.c:parse_cfg(765)] id=[REMOVED]\r\n[../pam_yubico.c:parse_cfg(766)] key=[REMOVED]\r\n[../pam_yubico.c:parse_cfg(767)] debug=1\r\n[../pam_yubico.c:parse_cfg(768)] alwaysok=0\r\n[../pam_yubico.c:parse_cfg(769)] verbose_otp=0\r\n[../pam_yubico.c:parse_cfg(770)] try_first_pass=1\r\n[../pam_yubico.c:parse_cfg(771)] use_first_pass=0\r\n[../pam_yubico.c:parse_cfg(772)] authfile=/etc/yubikey_mappings\r\n[../pam_yubico.c:parse_cfg(773)] ldapserver=(null)\r\n[../pam_yubico.c:parse_cfg(774)] ldap_uri=(null)\r\n[../pam_yubico.c:parse_cfg(775)] ldapdn=(null)\r\n[../pam_yubico.c:parse_cfg(776)] user_attr=(null)\r\n[../pam_yubico.c:parse_cfg(777)] yubi_attr=(null)\r\n[../pam_yubico.c:parse_cfg(778)] yubi_attr_prefix=(null)\r\n[../pam_yubico.c:parse_cfg(779)] url=(null)\r\n[../pam_yubico.c:parse_cfg(780)] capath=(null)\r\n[../pam_yubico.c:parse_cfg(781)] token_id_length=12\r\n[../pam_yubico.c:parse_cfg(782)] mode=chresp\r\n[../pam_yubico.c:parse_cfg(783)] chalresp_path=/var/yubico\r\n[../pam_yubico.c:pam_sm_authenticate(823)] get user returned: carl\r\n[../pam_yubico.c:do_challenge_response(505)] Loading challenge from file /var/yubico/carl-2575140\r\n[../util.c:load_chalresp_state(269)] Challenge: 1d6bebd9e0aae142ff1f6a1a136100d8ed1b2a488caa207d919959829872fc317b22f9b78ee095ee6f5f36a08484374580b424f3058d69c19777671cc9609b, hashed response: 915995f4806d8613c718af05138da469d5f4a55d, salt: bc76caba32b98f2cde3a092599484baac62a4541cf3e36685af782ba94106886, iterations: 10000, slot: 2\r\n[../pam_yubico.c:do_challenge_response(561)] Challenge-response FAILED\r\n[../pam_yubico.c:do_challenge_response(680)] Yubikey core error: timeout\r\n[../pam_yubico.c:do_challenge_response(689)] Challenge response failed: No such file or directory\r\n[sudo] password for carl \r\n```\r\n\r\nI don't see what the problem is because half of the time it works.\r\nFor reference this is what it looks like when the challenge response is successful:\r\n\r\n```\r\ncarl@ubuntu:~$ sudo -i\r\n[../pam_yubico.c:parse_cfg(761)] called.\r\n[../pam_yubico.c:parse_cfg(762)] flags 32768 argc 8\r\n[../pam_yubico.c:parse_cfg(764)] argv[0]=try_first_pass\r\n[../pam_yubico.c:parse_cfg(764)] argv[1]=authfile=/etc/yubikey_mappings\r\n[../pam_yubico.c:parse_cfg(764)] argv[2]=chalresp_path=/var/yubico\r\n[../pam_yubico.c:parse_cfg(764)] argv[3]=debug\r\n[../pam_yubico.c:parse_cfg(764)] argv[4]=id=[REMOVED]\r\n[../pam_yubico.c:parse_cfg(764)] argv[5]=key=[REMOVED]\r\n[../pam_yubico.c:parse_cfg(764)] argv[6]=mode=challenge-response\r\n[../pam_yubico.c:parse_cfg(764)] argv[7]=debug\r\n[../pam_yubico.c:parse_cfg(765)] id=[REMOVED]\r\n[../pam_yubico.c:parse_cfg(766)] key=[REMOVED]\r\n[../pam_yubico.c:parse_cfg(767)] debug=1\r\n[../pam_yubico.c:parse_cfg(768)] alwaysok=0\r\n[../pam_yubico.c:parse_cfg(769)] verbose_otp=0\r\n[../pam_yubico.c:parse_cfg(770)] try_first_pass=1\r\n[../pam_yubico.c:parse_cfg(771)] use_first_pass=0\r\n[../pam_yubico.c:parse_cfg(772)] authfile=/etc/yubikey_mappings\r\n[../pam_yubico.c:parse_cfg(773)] ldapserver=(null)\r\n[../pam_yubico.c:parse_cfg(774)] ldap_uri=(null)\r\n[../pam_yubico.c:parse_cfg(775)] ldapdn=(null)\r\n[../pam_yubico.c:parse_cfg(776)] user_attr=(null)\r\n[../pam_yubico.c:parse_cfg(777)] yubi_attr=(null)\r\n[../pam_yubico.c:parse_cfg(778)] yubi_attr_prefix=(null)\r\n[../pam_yubico.c:parse_cfg(779)] url=(null)\r\n[../pam_yubico.c:parse_cfg(780)] capath=(null)\r\n[../pam_yubico.c:parse_cfg(781)] token_id_length=12\r\n[../pam_yubico.c:parse_cfg(782)] mode=chresp\r\n[../pam_yubico.c:parse_cfg(783)] chalresp_path=/var/yubico\r\n[../pam_yubico.c:pam_sm_authenticate(823)] get user returned: carl\r\n[../pam_yubico.c:do_challenge_response(505)] Loading challenge from file /var/yubico/carl-2575140\r\n[../util.c:load_chalresp_state(269)] Challenge: 1d6bebd9e0aae142ff1f6a1a136100d8ed1b2a488caa207d919959829872fc317b22f9b78ee095ee6f5f36a08484374580b424f3058d69c19777671cc9609b, hashed response: 915995f4806d8613c718af05138da469d5f4a55d, salt: bc76caba32b98f2cde3a092599484baac62a4541cf3e36685af782ba94106886, iterations: 10000, slot: 2\r\n[../pam_yubico.c:do_challenge_response(583)] Got the expected response, generating new challenge (63 bytes).\r\n[../pam_yubico.c:do_challenge_response(663)] Challenge-response success!\r\n[sudo] password for carl: \r\n```\r\n\r\nHopefully I didn't paste anything that should be kept secret. If so, please remove that."}}
{"actor":{"display_login":"Carlgo11"}}