base(targeted) mode与mls mode切换,以base to mls为例:
1)临时关掉selinux: setenforce 0
2)修改selinux config成mls和permissive
3)fixfiles -F onboot,重启
4)在系统message中grep -i 类似"SELinux is preventing"之类的关键字,(只在图形模式下base到mls,关于colord时候遇到过)
5)如果有,需要audit2allow修复,如果无,修改selinux config成enforce,重启
尝试从光盘安装,最小安装并加装cc-config kickstart脚本中mls模式下需要mandatory安装的那些包,切换成功。
2019重启等保项目:网络ks.cfg安装(也会在ggroup处报错),切mls成功
光盘最小安装的话,restorecon / 会在cgroup处报错, mls permissive时也会无法编辑selinux config文件
注意:在运行ks时候,如果是安装时候创建guoxin,则切为mls enforce后无法登录;
在运行ks时候,如果是通过cc-config创建guoxin2,则切为mls enforce后无法登录;
如果是mls,permissive下创建的eal,可以!