0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

pam_succeed_if.soでエラーが出た場合

Posted at

前回、PAMの記事を書いたのですが、エラーに苦しんだのでメモです。

環境

以下の環境で試しました。

  • OS
    • CentOS 6.5
  • PAM
    • 1.1.1
  • OpenSSH
    • 5.3p1

エラー内容

以下のような設定を書いていました。

auth      required pam_sepermit.so 
auth      [success=ignore default=1] pam_succeed_if.so user in test1:test2
auth      [success=done default=die]        pam_duo.so
auth      [success=done default=ignore] pam_yubico.so id=XXXXX key=hoge authfile=/etc/yubikey_mappings
auth      required                      pam_deny.so

この状態で正しく認証してログインしようとすると、PAMでエラーが出ました。

Nov 30 13:15:56 iudev0007 sshd[8126]: fatal: PAM: pam_setcred(): The return value should be ignored by PAM dispatch

意味がよくわかりませんでしたが、調べたら以下のブログがヒットしました。
https://josemaas.net/blog/yubikey-pam-on-linux.html

どうやら ignore=ignore が必要っぽいです。

auth      [success=ignore ignore=ignore default=1] pam_succeed_if.so user in test1:test2

こうするとうまく行きます。

ignoreの意味など調べたのですが、未だに意味がわかっていません。
同じエラーで苦しむ人がいるかもしれないので一応書いておきましたが、もし誰か理由が分かる人がいたら教えてください!!

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?