In Red Hat Enterprise Edition Linux5, how does one use audit to check who modified the file?

Source: Internet
Author: User
In Red Hat Enterprise Edition Linux5, how does one use audit to check who modified the file? -- Linux general technology-Linux technology and application information. For details, refer to the following section. When we create a security policy for a server, it is necessary to check whether the file is accidentally changed from time to time. Using tools such as md5sum, you can know that a file has been changed, but you don't know who changed the file. Using the audit subsystem, it is possible to track the processes that change the file.

Use the auditctl command to set monitoring for a file:

[Root @ host] # auditctl-w/etc/hosts-p war-k hosts-file

Here, a monitoring item is set on the/etc/hosts file to call any system that may execute write, read, or change the attribute (-p war) (syscall ). This will be recorded as key hosts-file. The key can be used to search for those operations in the audit log. Use the ausearch command:
QUOTE:
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.