如何从 PAM 模块提示输入一些信息

发布于 2024-10-10 23:09:16 字数 216 浏览 0 评论 0原文

我正在为 ssh 编写一个可插拔身份验证模块。我正在寻找在用户名和密码验证之后但在授予用户访问权限之前提示输入一些额外信息的提示。谁能建议我该怎么做。

实际上,在 SSH 之后,我想将其扩展到其他一些服务。所以我正在寻找一些 PAM 模块级别的建议。

[编辑] 解决方案: 我使用过PAM提供的对话功能。它用于在 PAM 感知应用程序和模块之间进行通信。

谢谢, GG

I'm writing a Plug-gable authentication module for ssh. I am looking for prompting for some extra information after user name and password verification but before giving access to user. Can anyone suggest how should I do this.

Actually after SSH I want to extend the same for some other services. So I am looking at some PAM module level suggestion.

[EDIT] Solution :
I have used conversation function provided by PAM. It is used to communicate between PAM aware application and module.

Thanks,
GG

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

很快妥协 2024-10-17 23:09:16

看看键盘交互式 ssh 身份验证方法,它是为这种情况设计的。

对于 OpenSSH,您应该在 sshd_config 中启用 PAMAuthenticationViaKbdInt、ChallengeResponseAuthentication 和 UsePAM。

不过没试过,希望能有所帮助。

Have a look at keyboard-interactive ssh authentication method it is designed for such cases.

For OpenSSh you should enable PAMAuthenticationViaKbdInt, ChallengeResponseAuthentication and UsePAM in sshd_config.

Didn't tried it though, hope it will help.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文