Skip to content

SELinux for Swisscom RHEL ​

On newly provisioned Swisscom RHEL VMs, SELinux is by default set to enforcing. If you want to alter it to permissive, you can change the setting while the VM is in the Temp Admin state.

INFO

In permissive mode, SELinux logs policy violations but does not enforce the policy.

To change SELinux to permissive permanently, edit the configuration file:

bash
$ sudo vi /etc/selinux/config

Set SELINUX=permissive, save the file, and apply the change to the running system:

bash
$ sudo setenforce 0
$ sudo sestatus

To restore enforcing, set SELINUX=enforcing in the same file, then run:

bash
$ sudo setenforce 1
$ sudo sestatus

The configuration in /etc/selinux/config determines the mode after a reboot. sestatus shows both the current and configured modes.

WARNING

It is highly recommended to not change the SELinux mode to disabled mode, as it degrades the security and compliance of the system.