SELinux: Difference between revisions

From Freephile Wiki
Created page with "see http://fedoraproject.org/wiki/SELinux Category:System Administration Category:Security"
 
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight"
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
see http://fedoraproject.org/wiki/SELinux
see
* http://fedoraproject.org/wiki/SELinux
* http://www.nsa.gov/research/selinux/
 
 
== Turning Off SELinux ==
Temporarily turn off SELinux
<syntaxhighlight lang="bash">
echo 0 > /selinux/enforce
</syntaxhighlight>
The file itself will be empty, but you'll see something in <code>/var/log/messages</code>
<pre>
dbus: avc:  received setenforce notice (enforcing=0)
</pre>
 
Of course you can also turn it back on with "1" instead of "0".
 
This temporary change will not persist through a system reboot.  You need to modify <code>/etc/selinux/config</code> to make permanent changes.
 
Annoyingly, if you check to see if selinux is enabled, it reports "enabled" even when it's temporarily disabled!?
 
<syntaxhighlight lang="bash">
selinuxenabled && echo enabled || echo disabled
</syntaxhighlight>


[[Category:System Administration]]
[[Category:System Administration]]
[[Category:Security]]
[[Category:Security]]

Latest revision as of 13:32, 24 February 2025

see


Turning Off SELinux

Temporarily turn off SELinux

echo 0 > /selinux/enforce

The file itself will be empty, but you'll see something in /var/log/messages

dbus: avc:  received setenforce notice (enforcing=0)

Of course you can also turn it back on with "1" instead of "0".

This temporary change will not persist through a system reboot. You need to modify /etc/selinux/config to make permanent changes.

Annoyingly, if you check to see if selinux is enabled, it reports "enabled" even when it's temporarily disabled!?

selinuxenabled && echo enabled || echo disabled