我使用以下命令在ubuntu上安装了SELINUX:
sudo apt-get install selinux/etc/selinux中的配置文件包含以下信息
SELINUX=permissive
SELINUXTYPE=default
SETLOCALDEFS=0但是我无法设置selinux,当我使用sestatus -v command检查时,它会给出输出。
SELINUX is disabled我应该如何启用我的SELINUX?
当我使用命令seinfo时。它提供了以下输出
ERROR: policydb version 26 does not match my version range 15-24
ERROR: Unable to open policy /etc/selinux/default/policy/policy.26.
ERROR: Input/output errorcheck installation命令提供以下输出../proc/1内核。
未启用SELinux。init进程(PID 1)在不正确的域中运行。/etc/pan.d/登录没有启用SELinux,FSCKFIX没有启用-不严重,但可以防止系统启动.udev将创建未正确标记的节点。
请帮帮忙
发布于 2014-05-18 20:02:17
此错误可能是因为您正在运行AppArmor和SELinux。AppArmor默认安装在Ubuntu中。您不能同时使用两个LSM (Linux安全模块)。如果您希望使用AppArmor,则需要删除SELinux
发布于 2019-03-11 21:20:23
一个荒谬的老问题,但它帮助我找到我的问题的一部分,所以我增加了另一个答复。
您不仅需要像cioby23所说的那样删除cioby23,而且还有一些从上游Debian接收到的额外步骤,这些步骤都没有得到很好的记录。下面是使用标准提供的包将标准Ubuntu系统(对我来说为16.04.6)转换为允许模式使用SELinux的命令:
# make sure you have the most up-to-date info
apt-get update
apt-get dist-upgrade
#disable and remove apparmor
/etc/init.d/apparmor stop
apt-get remove apparmor
#install SELinux
apt-get install selinux
# install the missing dependency
apt-get install auditd
# install the activate tool required to make it work
apt-get install selinux-basics
#missing manual step to actually make SELinux work (part of selinux-basics)
selinux-activate
# need to restart for it to take effect
shutdown now就我个人而言,我发现selinux-activate必须通过对上游Debian (https://unix.stackexchange.com/questions/136988/whats-missing-with-my-selinux-installation)的讨论手动运行。
它解决了PID 1上错误上下文的精确问题,并给出了一个getfilecon误差。
EDIT1:更新语言,以避免在策略命名上的混淆。
EDIT2:对每个命令进行更好的描述
https://askubuntu.com/questions/468821
复制相似问题