PAM认证问题 [英] PAM authentication problem

查看:184
本文介绍了PAM认证问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用该模块使用PAM进行身份验证:
HTTP://$c$c.google .COM / p /的web2py /来源/浏览/胶子/的contrib / pam.py

I am using this module to authenticate using pam: http://code.google.com/p/web2py/source/browse/gluon/contrib/pam.py

我可以打电话验证(用户名,密码),并返回真/假。它适用于任何用户名,但根。我的猜测是,有在PAM一个安全限制,不允许检查root密码。

I can call authenticate('username','password') and it returns True/ False. It works for any 'username' but 'root'. My guess is that there is a security restriction in PAM that does not allow to check for the root password.

我需要能够检查root密码。有什么我可以在pam.conf中更改或别的地方取消这一限制?

I need to be able to check the root password. Is there anything I can change in the pam.conf or somewhere else to remove this restriction?

推荐答案

我找到了答案,你的问题,这个问题是在默认服务。

I found the answer to your question, the problem is in the default service.

当你调用函数进行身份验证(用户名,密码),请确保您通过适当的服务了。
像认证(用户名,密码,passwd文件)
或者你可以在/etc/pam.d中添加自定义的配置/

when you call the function authenticate('username','password') make sure you pass an appropriate service too. like authenticate('username','password', 'passwd') or you can add your custom configuration under /etc/pam.d/

下面是Webmin的项目的例子。

here is an example from the webmin project

#%PAM-1.0
auth    required    pam_unix.so nullok
account required    pam_unix.so
session required    pam_unix.so

写在文件上previous线下/etc/pam.d/目录,并把它称作'的myconfig'例如,然后通过它的名字的功能,它会工作(它为我做的): ð

write the previous lines on a file under /etc/pam.d/ and call it 'myconfig' for example, then pass it's name to the function, and it'll work (it did for me) :D

这篇关于PAM认证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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