Disabling SELinux on Centos 7 / RHEL the Easy Way

Last Updated on

In some scenarios, where compatibility over security takes precedent. What exactly is SELinux?

Short for Security-enhanced Linux, SELinux is a Linux variation that can be fully integrated into the Linux 2.6 kernel series and also several Linux distributions. SELinux has no concept of a root user, instead it includes enhanced security functionality through enforced mandatory access controls (MAC). SELinux was created by the National Security Agency as an example of how mandatory access controls, which can confine the actions of any process, can be added into Linux.

SELinux can be easily disabled with the following:

1
vi /etc/sysconfig/selinux

add SELINUX=disabled to the bottom of /etc/sysconfig/selinux and reboot:

1
2
3
4
5
6
7
8
9
10
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
SELINUX=disabled
Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Leave a Reply