quick-docs/modules/ROOT/pages/_partials/proc_disabling-selinux.adoc

52 lines
1.1 KiB
Text
Raw Normal View History

2018-06-22 16:10:52 +00:00
// Module included in the following assemblies:
//
// changing-selinux-states-and-modes.adoc
[#{context}-disabling-selinux]
2018-06-22 16:10:52 +00:00
= Disabling SELinux
When SELinux is disabled, SELinux policy is not loaded at all; it is not enforced and AVC messages are not logged. Therefore, all benefits of running SELinux listed in xref:{context}-benefits-of-selinux[Benefits of SELinux] are lost.
2018-06-22 16:10:52 +00:00
[IMPORTANT]
====
2020-11-09 15:56:49 +00:00
It is recommended to use permissive mode instead of permanently disabling SELinux. See xref:{context}-changing-to-permissive-mode[] for more information about permissive mode.
2018-06-22 16:10:52 +00:00
====
2020-11-09 15:56:49 +00:00
.Prerequisites
2018-06-22 16:10:52 +00:00
2020-11-09 15:56:49 +00:00
* The [package]`grubby` package is installed:
+
[subs="quotes"]
----
$ *rpm -q grubby*
grubby-_version_
----
.Procedure
To permanently disable SELinux:
. Configure your bootloader to add `selinux=0` to the kernel command line:
+
[subs="quotes"]
2018-06-22 16:10:52 +00:00
----
2020-11-09 15:56:49 +00:00
$ *sudo grubby --update-kernel ALL --args selinux=0*
----
2018-06-22 16:10:52 +00:00
2020-11-09 15:56:49 +00:00
. Restart your system:
+
[subs="quotes"]
----
2020-11-09 15:56:49 +00:00
$ *reboot*
2018-06-22 16:10:52 +00:00
----
2020-11-09 15:56:49 +00:00
.Verification step
* After reboot, confirm that the [command]`getenforce` command returns `Disabled`:
2018-06-22 16:10:52 +00:00
+
2020-11-09 15:56:49 +00:00
[subs="quotes"]
2018-06-22 16:10:52 +00:00
----
2020-11-09 15:56:49 +00:00
$ *getenforce*
2018-06-22 16:10:52 +00:00
Disabled
----