非法模块类型:etc/login.defs

illegal module type: etc/login.defs

我正在使用 Ubuntu 16.04.2 LTS,我遇到了互联网上多次提到的 "shaking authentication window" 问题,具体如下:

https://ubuntuforums.org/showthread.php?t=1761052&p=11267228#post11267228

这里: http://www.dahoba.xyz/2011/08/ubuntu-fix-cant-authenticate.html?m=1

总而言之,需要 root 权限的命令的身份验证 window 可能会出现一秒钟,来回摇晃,然后消失。

我经常遇到的一个推荐解决方案是:

"sudo chmod +s /usr/lib/policykit-1/polkit-agent-helper-1"

但这对我不起作用

这是我认为是我的 auth.log 的相关部分(注意时间,window 字面上闪烁):

4 月 25 日 06:56:53 xxxx polkit-agent-helper-1[4527]:PAM (polkit-1) 非法模块类型:etc/login.defs 4 月 25 日 06:56:53 xxxx polkit-agent-helper-1[4527]:PAM pam_parse:期望 return 值; [...到] 4 月 25 日 06:56:53 xxxx polkit-agent-helper-1[4529]:PAM (polkit-1) 非法模块类型:etc/login.defs 4 月 25 日 06:56:53 xxxx polkit-agent-helper-1[4529]:PAM pam_parse:期望 return 值; [...到] 4 月 25 日 06:56:53 xxxx polkit-agent-helper-1[4530]:PAM (polkit-1) 非法模块类型:etc/login.defs 4 月 25 日 06:56:53 xxxx polkit-agent-helper-1[4530]:PAM pam_parse:期望 return 值; [...到] 4 月 25 日 06:56:53 xxxx polkitd(authority=local):unix-session 的操作员:c2 无法通过身份验证获得对 unix-process 的操作 org.freedesktop.policykit.exec 的授权:2310:5776 [bash] (归 unix 用户所有:computer_user)

任何见解或帮助将不胜感激!

好的,经过一番查看,我意识到我的 polkit-1 看起来像这样:

    etc/login.defs to make sure that removing a user
    # also removes the user's mail spool file.
    # See comments in /etc/login.defs
    session    optional   pam_mail.so standard
    # Standard Un*x account and session
    @include common-account
    @include common-session

...一旦我注释掉第一行,一切就开始工作了:-|