SELinux 强制执行是否会阻止登录另一个用户帐户?

SELinux 强制执行是否会阻止登录另一个用户帐户?

我正在使用启用了 SELinux 的 Debian 6。

在 SElinux 中启用“强制”模式后,我尝试通过“登录”命令登录另一个用户帐户。但是,我受到了selinux的限制。

终端屏幕:

debian:~# id -Z
root:sysadm_r:sysadm_t
debian:~# login Test_Unix_User
Password: 
Linux debian 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 i686

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Would you like to enter a security context? [N]  N
Authentication failure

因此,我尝试使用audit2allow捕获和编译审计日志。但是,在安装 .pp 文件时,出现以下错误。

.pp安装错误消息:

debian:~# semodule -i loginSecurityContextProblemAuditLog.pp
libsepol.check_assertion_helper: neverallow violated by allow sysadm_t scsi_generic_device_t:chr_file { write };
libsemanage.semanage_expand_sandbox: Expand module failed
semodule:  Failed!

为什么即使我使用 root 帐户,我也无法登录其他帐户?

提前致谢!

答案1

我在 Linux 中禁用了 PAM,并且在启动时不会询问安全上下文。

在“/etc/pam.d/login”文件中注释以下行。

会话 [成功=确定忽略=忽略 module_unknown=忽略默认=坏] pam_selinux.so 打开

相关内容