mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2026-03-04 03:50:35 +08:00
语法高亮,滚动条美化,设置页面调整
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
<h2 id="补充说明">补充说明</h2>
|
||||
<p><strong>lastb命令</strong> 用于显示用户错误的登录列表,此指令可以发现系统的登录异常。单独执行lastb命令,它会读取位于<code>/var/log</code>目录下,名称为btmp的文件,并把该文件内容记录的登入失败的用户名单,全部显示出来。</p>
|
||||
<h3 id="语法">语法</h3>
|
||||
<pre><code>lastb(选项)(参数)</code></pre>
|
||||
<pre><code class="language-bash">lastb(选项)(参数)</code></pre>
|
||||
<h3 id="选项">选项</h3>
|
||||
<pre><code>-a:把从何处登入系统的主机名称或ip地址显示在最后一行;
|
||||
<pre><code class="language-bash">-a:把从何处登入系统的主机名称或ip地址显示在最后一行;
|
||||
-d:将IP地址转换成主机名称;
|
||||
-f<记录文件>:指定记录文件;
|
||||
-n<显示列数>或-<显示列数>:设置列出名单的显示列数;
|
||||
@@ -18,12 +18,12 @@
|
||||
</ul>
|
||||
<h3 id="实例">实例</h3>
|
||||
<p>首次运行lastb命令会报下的错误:</p>
|
||||
<pre><code>lastb: /var/log/btmp: No such file or directory
|
||||
<pre><code class="language-bash">lastb: /var/log/btmp: No such file or directory
|
||||
Perhaps this file was removed by the operator to prevent logging lastb info.</code></pre>
|
||||
<p>只需建立这个不存在的文件即可。</p>
|
||||
<pre><code>touch /var/log/btmp</code></pre>
|
||||
<pre><code class="language-bash">touch /var/log/btmp</code></pre>
|
||||
<p>使用ssh的登录失败不会记录在btmp文件中。</p>
|
||||
<pre><code>lastb | head
|
||||
<pre><code class="language-bash">lastb | head
|
||||
root ssh:notty 110.84.129.3 Tue Dec 17 06:19 - 06:19 (00:00)
|
||||
root ssh:notty 110.84.129.3 Tue Dec 17 04:05 - 04:05 (00:00)
|
||||
root ssh:notty 110.84.129.3 Tue Dec 17 01:52 - 01:52 (00:00)
|
||||
|
||||
Reference in New Issue
Block a user