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

21 lines
1.3 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="grpconv">grpconv</h1>
<p>用来开启群组的投影密码</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>grpconv命令</strong> 用来开启群组的投影密码。Linux系统里的用户和群组密码分别存放在<code>/etc</code>目录下的passwd和group文件中。因系统运作所需任何人都得以读取它们造成安全上的破绽。投影密码将文件内的密码改存在<code>/etc</code>目录下的shadow和gshadow文件内只允许系统管理者读取同时把原密码置换为“x”字符。投影密码的功能可随时开启或关闭您只需执行grpconv指令就能开启群组投影密码。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">grpconv</code></pre>
<h3 id="实例">实例</h3>
<p>设置cdy组密码</p>
<pre><code class="language-bash">groupmod --password 123456 cdy
cat /etc/group | grep cdy
cdy:123456:1000: //看出密码是123456</code></pre>
<p>启动影子系统</p>
<pre><code class="language-bash">grpconv
cat /etc/group | grep cdy
cdy:x:1000: //看出密码段已经被x替代
cat /etc/gshadow | grep cdy
cdy:123456:: //已经移到影子文件了</code></pre>
<p>gshadow, shadow只有root权限才可以查看。</p>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->