在以下情况下,如何正确调试 shell 登录?
身份验证通过 sssd 配置和 krb5 身份验证服务器进行处理。使用相同的 .conf 文件在 Ubuntu 16.04 LTS 上登录效果很好。一旦将其用于 17.04,使用除 root 之外的任何用户登录都会导致 getty shell 重新启动 - /var/log/syslog 状态
[email protected]: Service has no hold-off time, sheduling restert.
Stopped Getty on tty2.
Started Getty on tty2.
并且在 auth.log 中记录了以下内容:
pam_sss(login:account): Access denied for user <user>: 4 (System error)
System error
执行login <user>
结果
root@pctest# login <user>
password:
System error
root@pctest#
使用sssctl config-check
结果与 16.04 LTS 上的工作配置预期一致,没有出现任何错误。
我提到的每个测试都是在自动配置和手动检查的、格式化驱动器上新安装的系统上执行的。通过元包安装了其他软件包ubuntu-standard
(未安装桌面环境)。然而,这个问题也在升级到 17.04 的 16.04 LTS 系统上重现。
我既没有找到详细模式,login
也没有找到合理的方法来独立执行登录失败的部分。那么你会怎么做呢?
[编辑] 解决方法
给定问题的解决方案是:
我们的解决方法是在文件 /etc/sssd/sssd.conf 的 [domain] 部分设置 ad_gpo_access_control = permissive ...
答案1
您需要将 debug_level=10 添加到 sssd.conf 文件的所有部分,重新启动 sssd 并重新运行登录。然后查看 /var/log/sssd。另请阅读 https://docs.pagure.org/sssd.sssd/users/troubleshooting.html
答案2
只是想知道为什么一些新的 Active Directory 连接的 Linux(Debian 9)系统报告了这种情况,system error
而su
一些较旧的系统没有出现这种情况。设置ad_gpo_access_control = permissive
确实使其工作,但根本原因是新系统的 IP 地址位于 Active Directory 中未记录的子网中网站和服务一旦子网被添加并分配给站点(给予 AD 一些时间进行复制),就system error
不再报告。
答案3
在 Ubuntu 20.04 上也有同样的问题,添加
- ad_gpo_ignore_unreadable = True
- ad_gpo_access_control = 允许
解决了 Ubuntu 18.04 上不存在的问题(相同的 M$ AD 和 RFC_2307 属性映射)
我仍然需要找到正确的设置来保证系统安全
答案4
当我在 /etc/pam.d/sshd 中注释掉 pam_slurm.so 行时,发生了这种情况。对我来说,解决方案是重新启动 ssshd 服务。
我的 Ubuntu 20.04 服务器使用 pam_slurm.so 来限制访问,我决定禁用它。所以我从/etc/pam.d/sshd
#account required pam_slurm.so
然后我遇到了同样的问题。我检查了日志并尝试:
$ sudo systemctl restart sssd
那么问题就解决了。