How to display the commands that the user has executed on the master machine
Source: Internet
Author: User
How to display the command that the user has executed on the master machine-Linux general technology-Linux technology and application information. The following is a detailed description. You can use the lastcomm command to display the commands performed by the user (root and non-root) on the host. The setting steps are as follows:
1. # vi/etc/rc2.d/S99acctadm
Acctadm-e basic-f/var/adm/exacct/proc process // The system account management process is automatically started every time the system starts.
The displayed command is all the commands recorded in the system cache. The system cache will create a temporary file record history command under the/var/tmp directory! The file will be deleted after the system restarts!
5. When lastcomm is used, it is recommended to put its output into a file and upload it down for check!
# Lastcomm>/tmp/lastcomm. log
6. Refer to the lastcomm command and acctadm command.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service