uTools-Manuals/docs/linux/getsebool.html
2019-04-21 11:50:48 +08:00

22 lines
1.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="getsebool">getsebool</h1>
<p>查询SElinux策略内各项规则的布尔值</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>getsebool命令</strong> 是用来查询SElinux策略内各项规则的布尔值。SELinux的策略与规则管理相关命令seinfo命令、sesearch命令、getsebool命令、setsebool命令、semanage命令。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">getsebool [-a] [布尔值条款]</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-a列出目前系统上面的所有布尔值条款设置为开启或关闭值。</code></pre>
<h3 id="实例">实例</h3>
<p>查询本系统内所有的布尔值设置状况:</p>
<pre><code class="language-bash">getsebool -a
NetworkManager_disable_trans --&gt; off
allow_console_login --&gt; off
allow_cvs_read_shadow --&gt; off
allow_daemons_dump_core --&gt; on
....(底下省略)....</code></pre>
<p>查询httpd_enable_homedirs是否为关闭若没关闭请关闭它</p>
<pre><code class="language-bash">getsebool httpd_enable_homedirs
setsebool -P httpd_enable_homedirs=0 //0是关闭 1是开启
</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->