AUDITD.CONF(5)
π AUDITD.CONF(5) π
πΈ NAME πΈ
auditd.conf β audit daemon configuration file. It's giving settings central for the audit daemon, and you're gonna want to know every line. π«Ά
π DESCRIPTION π
Okay so the file /etc/audit/auditd.conf is where all the audit daemon's specific config lives. Each line should have one configuration keyword, an equal sign, and then the appropriate configuration info. No cap: all option names and values are case insensitive. The keywords we recognize are listed and described below. Also, keep each line to 160 characters or less or the line gets skipped β the disrespect! π And you can add comments by starting a line with a # character. Periodt. π
local_events
This yes/no keyword says whether or not to include local events. Normally you want local events, so the default is yes. Cases where you'd set it to no? When you want to aggregate events only from the network. At the moment, this is useful if the audit daemon is running in a container. π³ This option can only be set once at daemon start up. Reloading the config file has no effect. It's giving "set it and forget it." π
log_file
This keyword specifies the full path name to the log file where audit records will be stored. It must be a regular file. The default path is /var/log/audit/audit.log if not explicitly set. So if you don't say anything, that's where the tea gets spilled. π΅
write_logs
This yes/no keyword determines whether or not to write logs to the disk. Normally you want this, so the default is yes. It's lowkey the "do you want to keep receipts" option. π§Ύ
log_format
The log format describes how the information should be stored on disk. There are 2 options: raw and enriched. If set to RAW, the audit records will be stored in a format exactly as the kernel sends it. The ENRICHED option will resolve all uid, gid, syscall, architecture, and socket address information before writing the event to disk. This aids in making sense of events created on one system but reported/analyzed on another system. Iconic for cross-system detective work. π The NOLOG option is now deprecated. If you were setting this format, now you should set the write_logs option to no. We don't do deprecated here, bestie. π«
log_group
This keyword specifies the group that is applied to the log file's permissions. The default is root. The group name can be either numeric or spelled out. So you can go full numbers or full vibes. π’
priority_boost
This is a non-negative number that tells the audit daemon how much of a priority boost it should take. The default is 4. No change is 0. It's giving "how much main character energy do you want?" π
flush
Valid values are none, incremental, incremental_async, data, and sync. If set to none, no special effort is made to flush the audit records to disk. If set to incremental, then the freq parameter is used to determine how often an explicit flush to disk is issued. The incremental_async parameter is very much like incremental except the flushing is done asynchronously for higher performance. The data parameter tells the audit daemon to keep the data portion of the disk file sync'd at all times. The sync option tells the audit daemon to keep both the data and meta-data fully sync'd with every write to disk. The default value is incremental_async. It's literally the "how often do we save our progress" setting. πΎ
freq
This is a non-negative number that tells the audit daemon how many records to write before issuing an explicit flush to disk command. This value is only valid when the flush keyword is set to incremental or incremental_async. So it's the "every N records, we pause and save" vibe. β±οΈ
num_logs
This keyword specifies the number of log files to keep if rotate is given as the max_log_file_action. If the number is < 2, logs are not rotated. This number must be 999 or less. The default is 0 β which means no rotation. As you increase the number of log files being rotated, you may need to adjust the kernel backlog setting upwards since it takes more time to rotate the files. This is typically done in /etc/audit/audit.rules. If log rotation is configured to occur, the daemon will check for excess logs and remove them in effort to keep disk space available. The excess log check is only done on startup and when a reconfigure results in a space check. So it's not out here checking every five seconds β only on those specific moments. ποΈ
name_format
This option controls how computer node names are inserted into the audit event stream. It has the following choices: none, hostname, fqd, numeric, and user. None means that no computer name is inserted into the audit event. hostname is the name returned by the gethostname syscall. The fqd means that it takes the hostname and resolves it with dns for a fully qualified domain name of that machine. Numeric is similar to fqd except it resolves the IP address of the machine. In order to use this option, you might want to test that hostname -i or domainname -i returns a numeric address. Also, this option is not recommended if dhcp is used because you could have different addresses over time for the same machine. User is an admin defined string from the name option. The default value is none. It's giving "how do you want your machine to introduce itself?" πββοΈ
name
This is the admin defined string that identifies the machine if user is given as the name_format option. So if you picked user up there, this is where you type the name. βοΈ
max_log_file
This keyword specifies the maximum file size in mebibytes (MiB). When this limit is reached, it will trigger a configurable action. The value given must be numeric. So no "big" or "small" β give it a number. π’
max_log_file_action
This parameter tells the system what action to take when the system has detected that the max file size limit has been reached. Valid values are ignore, syslog, exec, suspend, rotate and keep_logs. If set to ignore, the audit daemon does nothing. syslog means that it will issue a warning to syslog. exec /path-to-script will execute the script. You cannot pass parameters to the script. The script is also responsible for telling the auditd daemon to resume logging once it's completed its action. This can be done by adding auditdctl --signal resume to the script. Also note that logging is stopped when this script runs. Whatever it does needs to be real quick because events are backing up in the kernel. The script MUST delete or rename /var/log/audit/audit.log or when logging resumes, it will retrigger executing the script. If the script fails to execute, auditing is suspended until it is told to resume by sending it a signal. suspend will cause the audit daemon to stop writing records to the disk. The daemon will still be alive. The rotate option will cause the audit daemon to rotate the logs. It should be noted that logs with higher numbers are older than logs with lower numbers. This is the same convention used by the logrotate utility. The keep_logs option is similar to rotate except it does not use the num_logs setting. This prevents audit logs from being overwritten. The effect is that logs accumulate and are not deleted β which will trigger the space_left_action if the volume fills up. This is best used in combination with an external script used to archive logs on a periodic basis. So many choices, but each one is a whole mood. π
verify_email
This option determines if the email address given in action_mail_acct is checked to see if the domain name can be resolved. This option must be given before action_mail_acct or the default value of yes will be used. Order matters, bestie! π§
action_mail_acct
This option should contain a valid email address or alias. Addresses may use RFC 5233 style subaddressing with the '+' character. The allowed characters are alphanumerics, '@', '.', '-', '_', and '+'. The default address is root. If the email address is not local to the machine, you must make sure you have email properly configured on your machine and network. This option requires that /usr/lib/sendmail exists on the machine. Many clients provide it as a symlink. So yeah, email drama is real. π¨
space_left
If the free space in the filesystem containing log_file drops below this value, the audit daemon takes the action specified by space_left_action. If the value of space_left is specified as a whole number, it is interpreted as an absolute size in mebibytes (MiB). If the value is specified as a number between 1 and 99 followed by a percentage sign (e.g., 5%), the audit daemon calculates the absolute size in mebibytes based on the size of the filesystem containing log_file. (E.g., if the filesystem containing log_file is 2 gigabytes in size, and space_left is set to 25%, then the audit daemon sets space_left to approximately 500 mebibytes. Note that this calculation is performed when the audit daemon starts, so if you resize the filesystem containing log_file while the audit daemon is running, you should send the audit daemon SIGHUP to re-read the configuration file and recalculate the correct percentage. So don't forget to send that signal after a resize! πΆ
space_left_action
This parameter tells the system what action to take when the system has detected that it is starting to get low on disk space. Valid values are ignore, syslog, rotate, email, exec, suspend, and single. If set to ignore, the audit daemon does nothing. syslog means that it will issue a warning to syslog. rotate will rotate logs, losing the oldest to free up space. Email means that it will send a warning to the email account specified in action_mail_acct as well as sending the message to syslog. exec /path-to-script will execute the script. You cannot pass parameters to the script. The script is also responsible for telling the auditd daemon to resume logging once it's completed its action. This can be done by adding service auditd resume to the script. suspend will cause the audit daemon to stop writing records to the disk. If the script fails to execute, the audit daemon will be left suspended until it's told to resume by sending it a signal. The single option will cause the audit daemon to put the computer system in single user mode. Except for rotate, it will perform this action just one time. The previously available halt option, which would cause the audit daemon to shut down the computer system, has been deprecated and should no longer be used. It was determined that halting the system at this stage could lead to unintended consequences and is considered a bad action if selected. So yeah, don't pick halt. It's giving "we don't do that anymore." π
ββοΈ
...and this is the glow-up arc of disk space warnings, bestie, so lock in. π Disk space notifications follow a three-stage progression. The space_left_action is the low water mark β it's your first little "hey girl, disk space is running low" heads-up. Halting at this stage is not recommended, because it stops administrators from taking corrective action (which is the whole point of a warning, no?). The next stage, admin_space_left_action, is the emergency level where immediate action is required to free up disk space β administrators should configure critical responses for this level. And finally, the disk_full_action hits when the disk is completely full. At that stage the system may have already halted, and the preemptive measures you configured in the earlier stages are what determine the system's behavior. So basically, plan ahead or perish. β¨
admin_space_leftβ a numeric value in mebibytes (MiB) that tells the audit daemon when to perform a configurable action because the system is running low on disk space. Consider this the last chance to do something before you run out of disk space entirely. π«Ά The numeric value for this parameter should be lower than the number forspace_left. You may also append a percent sign (e.g.1%) to the number to have the audit daemon calculate the number based on the disk partition size.admin_space_left_actionβ this parameter tells the system what action to take when the system has detected that it is low on disk space. Valid values areignore,syslog,rotate,email,exec,suspend,single, andhalt.ignoreβ the audit daemon does nothing.syslogβ it will issue a warning to syslog.rotateβ it will rotate logs, losing the oldest to free up space.emailβ it will send a warning to the email account specified inaction_mail_acct, as well as sending the message to syslog.exec /path-to-scriptβ it will execute the script. You cannot pass parameters to the script. The script is also responsible for telling theauditddaemon to resume logging once it's completed its action β do that by addingservice auditd resumeto the script.suspendβ causes the audit daemon to stop writing records to the disk. The daemon will still be alive. πsingleβ causes the audit daemon to put the computer system in single user mode.haltβ causes the audit daemon to shutdown the computer system.
Except for rotate, it will perform this action just one time.
disk_full_actionβ this parameter tells the system what action to take when the system has detected that the partition to which log files are written has become full. Valid values areignore,syslog,rotate,exec,suspend,single, andhalt.ignoreβ the audit daemon will issue a syslog message but no other action is taken.syslogβ it will issue a warning to syslog.rotateβ it will rotate logs, losing the oldest to free up space.exec /path-to-scriptβ it will execute the script. You cannot pass parameters to the script. The script is also responsible for telling theauditddaemon to resume logging once it's completed its action β again, addservice auditd resumeto the script.suspendβ causes the audit daemon to stop writing records to the disk. The daemon will still be alive.singleβ causes the audit daemon to put the computer system in single user mode.haltβ causes the audit daemon to shutdown the computer system.
disk_error_actionβ this parameter tells the system what action to take whenever there is an error detected when writing audit events to disk or rotating logs. Valid values areignore,syslog,exec,suspend,single, andhalt.ignoreβ the audit daemon will not take any action.syslogβ it will issue no more than 5 consecutive warnings to syslog.exec /path-to-scriptβ it will execute the script. You cannot pass parameters to the script.suspendβ causes the audit daemon to stop writing records to the disk. The daemon will still be alive.singleβ causes the audit daemon to put the computer system in single user mode.haltβ causes the audit daemon to shutdown the computer system.
π network girlies, this one's for you π
tcp_listen_portβ this is a numeric value in the range1..65535which, if specified, causesauditdto listen on the corresponding TCP port for audit records from remote systems. The audit daemon may be linked withtcp_wrappers. You may want to control access with an entry in thehosts.allowanddenyfiles. If this is deployed on a systemd based OS, then you may need to adjust the'After'directive β see the note in theauditd.servicefile. π Networking can be enabled by adding this option and sendingauditdaSIGHUP. Changing the port or disabling networking requires restarting the daemon so that clients reconnect.tcp_listen_queueβ this is a numeric value which indicates how many pending (requested but unaccepted) connections are allowed. The default is5. Setting this too small may cause connections to be rejected if too many hosts start up at exactly the same time, such as after a power failure. β‘ This setting is only used for aggregating servers. Clients logging to a remote server should keep this commented out. Changing this value while the daemon is running restarts the listener and drops any current connections.tcp_max_per_addrβ this is a numeric value which indicates how many concurrent connections from one IP address is allowed. The default is1and the maximum is1024. Setting this too large may allow for a Denial of Service attack on the logging server. Also note that the kernel has an internal maximum that will eventually prevent this even ifauditdallows it by config. The default should be adequate in most cases unless a custom written recovery script runs to forward unsent events β in this case you would increase the number only large enough to let it in too.use_libwrapβ this setting determines whether or not to usetcp_wrappersto discern connection attempts that are from allowed machines. Legal values are eitheryes, orno. The default value isyes.tcp_client_portsβ this parameter may be a single numeric value or two values separated by a dash (no spaces allowed). It indicates which client ports are allowed for incoming connections. If not specified, any port is allowed. Allowed values are1..65535. For example, to require the client use a privileged port, specify1-1023for this parameter. You will also need to set thelocal_portoption in theaudisp-remote.conffile. Making sure that clients send from a privileged port is a security feature to prevent log injection attacks by untrusted users. π₯tcp_client_max_idleβ this parameter indicates the number of seconds that a client may be idle (i.e. no data from them at all) beforeauditdcomplains. This is used to close inactive connections if the client machine has a problem where it cannot shutdown the connection cleanly. Note that this is a global setting, and must be higher than any individual clientheartbeat_timeoutsetting, preferably by a factor of two. The default iszero, which disables this check.transportβ if set toTCP, only clear text tcp connections will be used. If set toTLS, connections will be encrypted using TLS 1.3 with post-quantum hybrid key exchange. This requires a pre-shared key (tls_psk_file) to be configured. If set toKRB5, then Kerberos 5 will be used for authentication and encryption. The default value isTCP. Changes to this option take effect only after restart so that clients can reconnect.enable_krb5β this option is deprecated. Use thetransportoption above instead. If set to"yes", Kerberos 5 will be used for authentication and encryption. The default is"no". If this option is set to"yes"and it follows thetransportoption, it will override thetransportsetting. This would be the normal expected behavior for backwards compatibility.krb5_principalβ this is the principal for this server. The default is"auditd". Given this default, the server will look for a key named likeauditd/hostname@EXAMPLE.COMstored in/etc/audit/audit.keyto authenticate itself, wherehostnameis the canonical name for the server's host, as returned by a DNS lookup of its IP address.krb5_key_fileβ location of the key for this client's principal. Note that the key file must be owned byrootand mode0400. The default is/etc/audit/audit.key.tls_authβ the TLS authentication mode. Currently onlypskis supported (pre-shared key authentication). The default ispsk.tls_crypto_profileβ selects the cryptographic profile for TLS. Valid values arecompatible,system, andpqc.compatibleuses robust classical TLS 1.3 PSK with opportunistic PQC hybrid key exchange.systemdefers all cipher and group selection to the system crypto policy. For FIPS deployments, configure the host for FIPS mode and use this profile.pqcrequires post-quantum hybrid key exchange and rejects connections that negotiate a classical-only group.- The default is
compatible.
tls_psk_fileβ path to a file containing a hex-encoded pre-shared key for TLS-PSK authentication. The key must be at least 32 bytes (64 hex characters). Generate a key with:
openssl rand -hex 32
The file must be owned by root and mode 0400. This option is not required when tls_allowed_clients contains per-identity key entries (see below).
tls_psk_identityβ the expected client PSK identity string. This option is required whentls_psk_fileis set andtls_allowed_clientsis not configured. The server rejects clients that present a different identity. The identity must contain only printable ASCII characters (no spaces or control characters) and must not exceed 255 bytes. πΈtls_allowed_clientsβ the path to a file that lists which PSK client identities are actually authorized π. Formatting is one entry per line: identity, then status (enabledordisabled), then optional notes, all separated by whitespace. Any line starting with#is a comment, bestie.
There's two modes and you gotta know which one you're in:
Single-PSK mode (the backward-compatible one): every client shares one single key from tls_psk_file. At most one identity may be enabled. And listen β disabling an identity does not revoke a client that still has the shared key in its hot little hands π. You have to actually rotate the PSK. Periodt.
# identity status notes
host-1234 enabled prod web host
host-5678 disabled retired
Per-identity key mode: every identity gets its own key file, declared with a key= column holding an absolute path. Now you can have multiple enabled identities, slay. The key= prefix is only recognized when it's followed by / (i.e. an absolute path). Each key file has to meet the exact same requirements as tls_psk_file β mode 0400, root-owned, no symlinks, at least 32 bytes. If any entry has key=, then all entries must have one. And the per-identity keys must be cryptographically unique across entries β using the same key for two identities completely defeats the identity binding, don't do it π«Ά.
# identity status key file
host-prod enabled key=/etc/audit/psk/host-prod.key
host-retired disabled key=/etc/audit/psk/host-retired.key
In per-identity key mode, tls_psk_file is optional. Clients must be provisioned with their own per-identity key file β not a shared key, iykyk.
When this option is set, it is the sole authorization source for PSK connections, and tls_psk_identity is straight up ignored π. The file must be owned by root, not group-writable, and not world-writable. Also: switching between single-PSK and per-identity mode requires a daemon restart, no shortcuts.
On a SIGHUP ACL reload, any connected client whose identity is disabled or absent from the new ACL gets disconnected immediately π. AUDIT_DAEMON_CLOSE and AUDIT_CRYPTO_KEY_USER audit records are emitted for each evicted client.
tls_cipher_suitesβ a colon-separated list of TLS 1.3 cipher suites β¨. Overrides the profile default. The default is"TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384".tls_key_exchangeβ colon-separated list of key exchange groups πΈ. Overrides the profile default. Heads up: overrides cannot weaken a PQC profile's post-handshake group check. Also PQC hybrid key exchange bumps handshake sizes by approximately 1120 bytes, which may mean you have to update network middleboxes doing deep packet inspection. Not me warning you about middleboxes π₯².tls_require_pqcβ a compatibility alias fortls_crypto_profile=pqc. If set toyes, it setstls_crypto_profiletopqc. If set tono, it has no effect ontls_crypto_profile(one-directional alias, the way that it only goes one way). New configurations should just usetls_crypto_profiledirectly, fr fr.distribute_networkβ if set to"yes", network originating events get distributed to the audit dispatcher for processing. The default is"no".q_depthβ a numeric value telling how big to make the internal queue of the audit event dispatcher π¬. A bigger queue lets it handle a flood of events better, but it could hold events that never get processed when the daemon is terminated. If you're seeing messages in syslog about events getting dropped, bump this value. The default value is2000.overflow_actionβ this one decides how the daemon reacts to overflowing its internal queue π³. When that happens, it means more events are coming in than it can pass along to child processes, and the error means it's going to lose the current event it's trying to dispatch. Choices are:ignore,syslog,suspend,single, andhalt.ignoreβ the audit daemon does nothing.syslogβ it issues a warning to syslog.suspendβ the audit daemon stops sending events to child processes. The daemon stays alive though.singleβ the audit daemon puts the computer system into single user mode.haltβ the audit daemon shuts the computer system down. π dramatic but that's literally what it does.
max_restartsβ a non-negative number telling the audit event dispatcher how many times it can try to restart a crashed plugin. The default is10.plugin_dirβ the locationauditdwill use to search for its plugin configuration files π. The default directory is/etc/audit/plugins.d.end_of_event_timeoutβ a non-negative number of seconds used by the userspaceauparse()library routines and theaureport(8),ausearch(8)utilities to decide an event is complete when parsing an event log stream β. For a stream being processed, if the time of the current event is overend_of_event_timeoutseconds old compared to co-located events, then the event is considered complete. The default is2seconds. See the NOTES section for more detail.report_intervalβ the interval between automatic state reports π¦. The value is a time string: a number optionally followed bymfor minutes,hfor hours,dfor days, orMfor months. The default is0, which disables periodic reporting. The largest value is 40 days. When set,auditdwill periodically generate the state report written to/run/audit/auditd.state.
π RELOADING π
Most parameters can be changed while the daemon is running by sending SIGHUP to auditd β¨. You can also do it with auditctl --signal reload. The options that are only read at startup include local_events and verify_email. Those two don't reload, sorry bestie π
.
π NOTES π
Changes to TLS configuration options (tls_psk_file, tls_psk_identity, tls_cipher_suites, tls_key_exchange, tls_require_pqc, tls_auth, tls_crypto_profile) require a full daemon restart to take effect. Switching the tls_allowed_clients ACL between single-PSK and per-identity key mode also requires a restart. The tls_allowed_clients ACL file itself is reloaded on SIGHUP without restarting the daemon; connected clients whose identity is disabled or removed by the reload are disconnected immediately π₯.
In a CAPP environment, the audit trail is considered so important that access to system resources must be denied if an audit trail cannot be created π. In this environment, it's suggested that /var/log/audit live on its own partition β that's to ensure space detection is accurate and that no other process comes along and consumes part of it.
The flush parameter should be set to sync or data.
Max_log_file and num_logs need to be adjusted so that you get complete use of your partition. Worth noting: the more files that have to be rotated, the longer it takes to get back to receiving audit events. Max_log_file_action should be set to keep_logs.
Space_left should be set to a number that gives the admin enough time to react to any alert message and perform some maintenance to free up disk space πΈ. This would typically involve running the aureport -t report and moving the oldest logs to an archive area. The value of space_left is site dependent, since the rate at which events are generated varies with each deployment. space_left_action is recommended to be set to email. If you need something like an snmp trap, you can use the exec option to send one.
Admin_space_left should be set to the amount of disk space on the audit partition needed for admin actions to be recorded. Admin_space_left_action would be set to single so that use of the machine is restricted to just the console.
The disk_full_action is triggered when no more room exists on the partition π. All access should be terminated since no more audit capability exists. This can be set to either single or halt.
The disk_error_action should be set to syslog, single, or halt, depending on your local policies regarding handling of hardware malfunctions.
Specifying a single allowed client port may make it difficult for the client to restart their audit subsystem, since it will be unable to recreate a connection with the same host addresses and ports until the connection closure TIME_WAIT state times out π.
Auditd events are made up of one or more records. The auditd system cannot guarantee that the set of records that make up an event will occur atomically β that is, the stream will have interleaved records of different events, IE
event0_record0
event1_record0
event2_record0
event1_record3
event2_record1
event1_record4
event3_record0
The auditd system does not guarantee that the records that make up an event will appear in order π. So when processing event streams, we need to maintain a list of events with their own list of records β hence List of List (LOL) event processing. Yes, it's literally called LOL. π
When processing an event stream we define the end of an event via
record type = AUDIT_EOE (audit end of event type record), or
record type = AUDIT_PROCTITLE (we note the AUDIT_PROCTITLE is
always the last record), or
record type = AUDIT_KERNEL (kernel events are one record events),
or
record type < AUDIT_FIRST_EVENT (only single record events appear
before this type), or
record type >= AUDIT_FIRST_ANOM_MSG (only single record events
appear after this type), or
record type >= AUDIT_MAC_UNLBL_ALLOW && record type <=
AUDIT_MAC_CALIPSO_DEL (these are also one record events), or
for the stream being processed, the time of the event is over
end_of_event_timeout seconds old.
π LOG ROTATION POLICY π
By default, auditd uses size-based log rotation. If you'd rather have time-based rotation (e.g., hourly, daily, weekly, or a custom schedule), go look at auditd.cron(5) for the configuration details β¨.
π FILES π
/etc/audit/auditd.confβ Audit daemon configuration file π
π SEE ALSO π
auditd(8), audisp-remote.conf(5), auditd-plugins(5), auditd.cron(5).
π AUTHOR π
Steve Grubb
And that's the whole page, bestie β this one's from Red Hat, dated June 2025, and it's AUDITD.CONF(5) π¦β¨. Go forth and configure your audit daemon, you absolute icon π
π
π¦ where this page comes from
- arch rolling: audit 4.2.1-1 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 43: audit 4.2.1-1.fc43 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- fedora 44: audit 4.2.1-1.fc44 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- nixpkgs unstable: audit 4.2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms