

The following command checks if /etc/passwd has been accessed by anyone. Query auditd Daemon Log Check if a specific file has been accessed by anyone Once auditd starts running, it will start generating an audit daemon log in /var/log/audit/audit.log as auditing is in progress.Ī command-line tool called ausearch allows you to query audit daemon logs for specific violations. Once you finish editing the audit configuration, restart auditd. # lock the audit configuration to prevent any modification of this file. # monitor read-access of the following directory. # monitor write-access and change in file properties (read/write/execute) of the following files. # monitor open() system call by Linux UID 1001. # monitor unlink() and rmdir() system calls. # increase the buffers to survive stress events. The following is an example auditd configuration file.

In this tutorial, I will use the auditd configuration file. The other method is to edit the audit configuration file located at /etc/audit/les. One is to use a command-line utility called auditctl. Once you installed auditd, you can configure it by two methods. If you want to start auditd automatically upon boot on Fedora, CentOS or RHEL, you need to run the following.
FILE MONITOR LINUX INSTALL
For Fedora, CentOS or RHEL: $ sudo yum install audit Once installed by apt-get, auditd will be set to start automatically upon boot. Install auditd on Linux For Ubuntu, Debian or Linux Mint: $ sudo apt-get install auditd
FILE MONITOR LINUX HOW TO
In this tutorial, I will describe how to monitor file access on Linux by using auditd. In the Linux Audit System, a daemon called auditd is responsible for monitoring individual system calls, and logging them for inspection. To monitor who changed or accessed files or directories on Linux, you can use the Linux Audit System which provides system call auditing and monitoring. For example, you want to track any unauthorized change in system configuration files such as /etc/passwd. If you are running a mission critical web server, or maintaining a storage server loaded with sensitive data, you probably want to closely monitor file access activities within the server. How to monitor file access on Linux with auditd
