Linux lastb命令

更新时间: 2019-10-16 12:40

Linux lastb命令用于列出登入系统失败的用户相关信息。

单独执行lastb指令,它会读取位于/var/log目录下,名称为btmp的文件,并把该文件内容

记录的登入失败的用户名单,全部显示出来。

语法

lastb [-adRx][-f <记录文件>][-n <显示列数>][帐号名称...][终端机编号...]

参数说明

  • -a  把从何处登入系统的主机名称或IP地址显示在最后一行。
  • -d  将IP地址转换成主机名称。
  • -f<记录文件>  指定记录文件。
  • -n<显示列数>或-<显示列数>  设置列出名单的显示列数。
  • -R  不显示登入系统的主机名称或IP地址。
  • -x  显示系统关机,重新开机,以及执行等级的改变等信息。

实例

显示登录失败的用户

# lastb 
root   tty7     :1        Thu May 13 11:26 - 11:26 (00:00)  

btmp begins Thu May 13 11:26:39 2014
Coming of Age in Second Life

Coming of Age in Second Life

Tom Boellstorff / Princeton University Press / 2008-04-21 / USD 29.95

The gap between the virtual and the physical, and its effect on the ideas of personhood and relationships, is the most interesting aspect of Boellstorff's analysis... Boellstorff's portrayal of a virt......一起来看看 《Coming of Age in Second Life》 这本书的介绍吧!

HTML 压缩/解压工具

HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JSON 在线解析

JSON 在线解析

在线 JSON 格式化工具

RGB HSV 转换

RGB HSV 转换

RGB HSV 互转工具