In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail about using the lastb command in linux to list users who failed to log in to the system. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
The lastb command is used to display a list of user login errors, which can detect login anomalies on the system.
Execute the lastb command alone, which reads the file named btmp located in the / var/log directory and displays the list of failed login users recorded in the file contents.
Syntax format: lastb [parameters]
Common parameters:
-a displays the host name or ip address from where to log in to the system on the last line-d converts the IP address to the host name-f specifies the record file-n sets the number of display columns on the list-R does not display the host name or IP address of the login system-x shows information such as system shutdown, reboot, and change of execution level
Reference example
List the user records that failed to log in:
[root@linuxcool] # lastb root ssh:notty 192.168.3.8 Mon Apr 29 14:25-14:25 (00:00) root ssh:notty 192.168.3.8 Mon Apr 29 14:25-14:25 (00:00) btmp begins Mon Apr 29 14:25:16 2019
Use the-a parameter to display IP in the last column:
[root@linuxcool] # lastb-aroot ssh:notty Mon Apr 29 14:25-14:25 (00:00) 192.168.3.8root ssh:notty Mon Apr 29 14:25-14:25 (00:00) 192.168.3.8btmp begins Mon Apr 29 14:25:16 2019
Do not display hostname and IP information using the-R parameter:
[root@linuxcool] # lastb-Rroot ssh:notty Mon Apr 29 14:43-14:43 (00:00) root ssh:notty Mon Apr 29 14:25-14:25 (00:00) btmp begins Mon Apr 29 14:25:16 2019 users who use the lastb command in linux to list login failures are done here. I hope the above can be helpful and learn more. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.