SELinux: Difference between revisions

No edit summary
m Text replacement - "<(\/?)source" to "<$1syntaxhighlight"
 
Line 6: Line 6:
== Turning Off SELinux ==
== Turning Off SELinux ==
Temporarily turn off SELinux
Temporarily turn off SELinux
<source lang="bash">
<syntaxhighlight lang="bash">
echo 0 > /selinux/enforce
echo 0 > /selinux/enforce
</source>
</syntaxhighlight>
The file itself will be empty, but you'll see something in <code>/var/log/messages</code>
The file itself will be empty, but you'll see something in <code>/var/log/messages</code>
<pre>
<pre>
Line 20: Line 20:
Annoyingly, if you check to see if selinux is enabled, it reports "enabled" even when it's temporarily disabled!?
Annoyingly, if you check to see if selinux is enabled, it reports "enabled" even when it's temporarily disabled!?


<source lang="bash">
<syntaxhighlight lang="bash">
selinuxenabled && echo enabled || echo disabled
selinuxenabled && echo enabled || echo disabled
</source>
</syntaxhighlight>


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