OSX“登录窗口"PAM 配置文件? [英] OSX "loginwindow" PAM config file?

查看:75
本文介绍了OSX“登录窗口"PAM 配置文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我又回到了为 OSX 编写 PAM 模块的永无止境的传奇.我已经编写了模块.它在使用 ssh 或启动新的终端窗口或 su 时有效.我真正、真正、真正想要的只是 ssh 和登录窗口.

I'm back again with the never ending saga of writing a PAM module for OSX. I have the module written. It works when using ssh or starting a new terminal window or su. What I really, really, really want is just ssh and the loginwindow.

我的 PAM 模块在会话"模式下工作.它要么返回 PAM_SUCCESS 要么返回 PAM_IGNORE.同样,它可以与其他 PAM 感知系统一起使用,如 ssh 和 su.我真的很想挂入登录窗口.知道如何使用 OSX 和 openPAM 做到这一点吗?

My PAM module works in "session" mode. It either returns PAM_SUCCESS or PAM_IGNORE. Again, it works with other PAM aware systems like ssh and su. I really want to hook into the loginwindow. Any idea how to do this with OSX and openPAM?

我看到了一些建议使用pam.d/authenticate"文件的潜在答案.这还没有奏效.在那里设置我的会话线路似乎会导致系统与 Active Directory 的连接失败.

I have seen a couple potential answers that suggest using the "pam.d/authenticate" file. This has not worked yet. Setting my session line in there seems to cause the system's connection to Active Directory to fail.

我也尝试过创建一个pam.d/loginwindow"文件,以防万一——没有什么乐趣.

I have also tried creating a "pam.d/loginwindow" file just in case there was a provision for it -- no joy.

想法?

推荐答案

我知道这为时已晚.我最近一直在研究 PAM 模块.要将模块添加到登录窗口,您需要将 .so 文件添加到 mac 中位于/etc/pam.d/authorisation 的授权配置文件中.您应该将 .so 文件放在/usr/lib/pam/目录下.

I know this is too late. I have been working out with PAM modules lately. For adding the module to the login window, you need to add your .so file to the authorisation configuration file in mac located in /etc/pam.d/authorisation. You should place your .so file under /usr/lib/pam/ directory.

同样在 PAM 模块之前,如果你想摆弄 Mac 登录窗口视图,你需要使用 SFAuthorizationPluginView 类来完成.Apple developer 有一个示例插件代码.https://developer.apple.com/library/mac/samplecode/NameAndPassword/Introduction/Intro.html

Also before the PAM module if you want to fiddle around with the Mac Login Window view, you need to do it using the SFAuthorizationPluginView Class. There is a sample plugin code at Apple developer. https://developer.apple.com/library/mac/samplecode/NameAndPassword/Introduction/Intro.html

Apple 还提供了一些有关登录过程的文档.你可以参考这里

There is also some documentation by Apple over Login processes. You can take reference here!

希望有所帮助.干杯!!

Hope that helps. Cheers!!

这篇关于OSX“登录窗口"PAM 配置文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆