我可以在系统中获取登录日志吗? [英] Can I get a log of logins in the system

查看:76
本文介绍了我可以在系统中获取登录日志吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过每天的电子邮件获取物理服务器计算机中发生的登录用户名和时间列表。



有关怎样的任何建议我这样做了吗?



提前谢谢!

I would like to get a list of logins username and time that have happened in the physical server machine by e-mail daily.

Any advice on how can I do it?

Thank you in advance!

推荐答案





如何查看Linux登录历史记录



Linux操作系统是一个多用户操作系统。这意味着一次只能有一个用户登录到一台计算机。 last命令用于显示所有用户的登录历史记录。它还可用于显示单个用户的登录历史记录。如果用户从远程位置登录,您可以使用命令-a选项显示远程计算机的IP地址。



1 。打开一个终端窗口,根据您的发行版在主菜单的系统工具,实用程序或附件部分找到。



2。输入命令last以查看所有用户的登录历史记录。



3.输入命令last< username>查看单个用户的登录历史记录。替换< username>使用特定用户的用户名。



4.键入命令last -a以查看登录历史记录以及用户记录的计算机的IP地址in(用户的本地计算机)。



5.输入命令exit关闭终端窗口。



您将需要第一个组件来检索用户登录历史信息,以及第二个具有发送邮件消息能力的组件。您可能需要第三个组件来安排操作,否则使用系统调度程序。
Hi,

How to View Linux Login History

The Linux operating system is a multi-user operating system. This means that more that one user can be logged on to a single computer at a time. The "last" command is used to display a login history for all users. It can also be used to show the login history of a single user. If the users are logging into from a remote location, you can use the "-a" option with the command to show the IP address of the remote computer.

1. Open a terminal window which is found under the "System Tools," "Utilities" or "Accessories" section of the main menu depending on your distribution.

2. Type the command "last" to see the login history of all users.

3. Type the command "last <username>" to see the login history of a single user. Replace "<username>" with the username for the particular user.

4. Type the command "last -a" to see the login history along with the IP address of the computer the user logged in from (the user''s local computer).

5.Type the command "exit" to close the terminal window.

You will need a first component to retreive the user login history information, and a second component with the capacity to send the mail message. You may need a third component for scheduling the operations, otherwise use a system scheduler.


这篇关于我可以在系统中获取登录日志吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆