Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk12 min

How to Use the Linux Auditing System (auditd) on a VPS

Learn how to deploy Linux auditd on a VPS, create targeted persistent rules, identify who changed files, search events with ausearch, summarize them with aureport, and keep logging sustainable on limited storage.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use auditd when you need a tamper-resistant record of security-relevant actions on a Linux VPS. Install the distribution’s audit package, keep persistent rules in /etc/audit/rules.d/, assign a useful key to every rule family, load the policy through the supported augenrules and service workflow, then generate a controlled event and verify it with ausearch. Use aureport to turn the raw records into summaries.

A small VPS should not log every possible system call. Start with the files, identities, and privileged actions that matter to your service, measure the resulting event and disk volume, and expand coverage only when the investigation or compliance requirement justifies the overhead.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What auditd is and what it records

auditd is the userspace component of the Linux Auditing System. The kernel generates audit events; the audit daemon receives those records and writes them to disk. It is designed for security auditing and investigation, not as a general-purpose application log collector. Web-server access logs, database logs, container logs, and application diagnostics still need their own logging configuration.

The normal tool chain has distinct jobs:

  • auditd runs as the daemon and persists records.
  • auditctl inspects the live audit state, loads temporary rules, and performs runtime operations.
  • ausearch finds individual events by time, key, user, message type, or other fields.
  • aureport summarizes events into reports such as file, authentication, or user activity.
  • augenrules compiles rule fragments from /etc/audit/rules.d/ into the file used at startup.

At boot, the audit rules file is read and the daemon settings come from /etc/audit/auditd.conf. The exact service name, package name, and reload behavior differ between distribution releases, so use the installed release’s manual pages when a command behaves differently from the examples below.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Plan a VPS audit policy before installing rules

Audit data is useful only when an administrator can identify the event, the actor, and the affected object. Write down the questions your policy must answer before adding rules:

  • Who changed SSH, sudo, account, firewall, or service configuration?
  • Which privileged commands were executed?
  • When did a sensitive file change, and which process performed the write?
  • Which account authenticated, from where, and with what result?
  • How long must records remain available if the VPS is compromised?

Map each question to a narrowly scoped rule family and give that family a stable key. For example, use a key such as ssh_config for SSH configuration, identity for account databases, and privileged_exec for a deliberately selected set of privileged execution events. Keys are labels, not access controls; they make later searches and reports understandable.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Decide where the records will live and who can read them. Local logs help with immediate troubleshooting, but an attacker who gains root access may be able to alter or delete local evidence. If incident requirements call for independent retention, forward audit records to a protected central destination using the distribution-supported audit transport and secure the receiving system separately.

Install and start auditd

Debian and Ubuntu family

On Debian- and Ubuntu-family systems, install the package named auditd with the release’s package manager. A typical sequence is:

sudo apt update
sudo apt install auditd audispd-plugins
sudo systemctl enable --now auditd

The plugin package is useful when the distribution provides forwarding or other audit event plugins; install only what your policy needs. Confirm the service and utilities are present:

sudo systemctl status auditd
sudo auditctl -s
sudo auditctl -l

RHEL-family systems

On RHEL-family systems, install the package named audit with the release’s package manager. A common sequence is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo dnf install audit
sudo systemctl enable --now auditd

Some releases restrict how the audit service is restarted because stopping it can create an auditing gap. Follow that release’s auditd and service manual pages instead of forcing a generic restart. Then inspect the status and currently loaded rules:

sudo systemctl status auditd
sudo auditctl -s
sudo auditctl -l

The status command shows whether auditing is enabled and can reveal backlog or failure settings. The rule listing is important before you add anything: a rule already loaded by the distribution or an image provider can duplicate your new rule and multiply event volume.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

Understand the three kinds of audit rules

Control rules

Control rules set audit behavior rather than selecting a particular file or system call. They can set the event backlog, the response when the kernel cannot deliver an event, and rate limits. A control line must match the capacity and risk tolerance of the VPS; a setting copied from a large server can be inappropriate on a small instance.

Examples commonly seen in a policy include a delete-and-rebuild directive, a backlog size, a failure mode, and a rate limit. Do not paste those values blindly. A restrictive failure mode can stop or disrupt workloads when the audit pipeline is unavailable, while a permissive mode can leave you without records. The installed manual page documents the valid values and their consequences for your release.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

File rules

File rules watch a path and selected permissions. The permissions letters normally describe read, write, execute, and attribute changes; for change detection, write and attribute monitoring are the usual starting point. A focused fragment might contain:

-w /etc/ssh/sshd_config -p wa -k ssh_config
-w /etc/passwd -p wa -k identity
-w /etc/group -p wa -k identity

These watches answer who changed the file and when, but they do not make an application log collector unnecessary. Add only paths that matter to the VPS. Watching an entire large application tree can create substantial event volume and make investigations harder.

Path handling deserves care. If a watched path is a symbolic link, the target that the kernel resolves may be the object that must be watched. Check the target and the distribution’s audit documentation before assuming that a link itself covers every underlying file.

Syscall rules

Syscall rules match operations at the kernel interface and can cover actions that are not tied to one fixed path. They are powerful but easier to over-broaden. Include an architecture field where appropriate; the audit rules manual treats this as a performance recommendation. A deliberately scoped execution rule could look like:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
-a always,exit -F arch=b64 -S execve -k privileged_exec

That example can produce a high volume of records on an active VPS because every matching execution is recorded. Narrow it with the relevant user, executable, path, or success filters after confirming the syntax supported by the target release. If the VPS can run 32-bit binaries, determine whether a corresponding 32-bit rule is required; do not add one merely by copying a line without understanding the workload.

Put persistent rules in the right files

Use a numbered fragment under /etc/audit/rules.d/ for rules that must survive reboot. Numbering establishes a predictable compilation order and helps separate your policy from vendor-provided fragments. For example:

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
sudoedit /etc/audit/rules.d/50-vps-baseline.rules

Keep that file limited to the policy you own:

-w /etc/ssh/sshd_config -p wa -k ssh_config
-w /etc/passwd -p wa -k identity
-w /etc/group -p wa -k identity
-w /etc/sudoers -p wa -k privilege_config
-w /etc/sudoers.d/ -p wa -k privilege_config

Rule-file syntax is essentially the same as an auditctl command without typing the command name. Do not place shell commands, comments that your release’s parser does not accept, or unrelated daemon configuration in the fragment. Keep daemon settings such as log rotation and disk actions in /etc/audit/auditd.conf.

The compiled file is commonly /etc/audit/audit.rules. On systems that provide augenrules, it combines the fragments and loads the result through the supported service workflow. Inspect the generated file and the live policy after every change so that a syntax error or duplicate is caught before an incident.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Validate and load a policy safely

  1. Inspect first. Save the output of sudo auditctl -s and sudo auditctl -l. Note the current enabled state, backlog values, and existing rule keys.
  2. Check the fragment. Review every path, permission, architecture, syscall, filter, and key. Remove broad rules that do not answer a defined investigative question.
  3. Compile through the distribution mechanism. On systems with augenrules, run the command or the documented service reload procedure for that release. Do not assume that editing /etc/audit/audit.rules directly is the preferred persistent workflow.
  4. Confirm the live result. Run sudo auditctl -l again and verify that each intended rule appears once. If it does not, read the service journal and the audit utility’s error output before generating test traffic.
  5. Record the change. Keep the fragment under configuration management, note the intended key and scope, and record the measured event volume after deployment.

Runtime commands issued with auditctl can be useful for diagnosis or a short experiment, but they may disappear at reboot and can conflict with the persistent policy. Treat the rule fragment as the source of truth for production.

Test that a rule records the right person and action

Never assume that a rule works because it loaded. Create a controlled test using a disposable file in a directory appropriate for your service:

sudo install -m 600 /dev/null /tmp/auditd-test-file
sudo sh -c 'printf test > /tmp/auditd-test-file'
sudo chmod 640 /tmp/auditd-test-file

If the test path is covered by your rule, search by its key and restrict the time window:

sudo ausearch -k test_key --start recent -i

Use the exact key from your rule in place of test_key. The interpreted output can include the event time, account identifiers, process ID, executable, system-call result, working directory, command arguments, and one or more PATH records. A single user action may produce several records tied together by the same audit event identifier; read the complete event rather than treating one line as the whole story.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To test a configuration watch, change the file in a controlled maintenance window, then restore it and verify both the change and the responsible process. For an execution rule, invoke a harmless command that actually matches the filters. If no event appears, check the rule key, the time interpretation, whether the operation used a symlink target, and whether another policy replaced your rule during reload.

Search events with ausearch

ausearch is the investigation tool. Begin with a key, then narrow by date, user, message type, or success status. Examples:

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.
sudo ausearch -k ssh_config -i
sudo ausearch -k identity --start today -i
sudo ausearch -k privileged_exec --start this-week --raw

The -i option interprets numeric identifiers and other values for easier reading. Raw output is useful when piping records to a report command or when another tool needs the original fields. Keep the time boundary close to the suspected incident; searching an entire long-retention log is slower and produces more noise.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The audit manuals document key-based pipelines such as:

sudo ausearch --start this-week -k access --raw | aureport --file --summary

Replace access with the key used by your own rule family. You can also search for a particular account, executable, or event type when those fields are present, but do not infer that an absent field proves an action did not occur. Different rule types emit different record sets.

Summarize activity with aureport

aureport turns raw audit records into summaries that are easier to review regularly. Useful report families include authentication, account activity, executable use, and file activity. A file summary from a selected key can be produced with:

sudo ausearch --start today -k identity --raw | aureport --file --summary -i

Use the report that matches the question. A file report helps identify changed paths; an authentication report helps review login outcomes; a user report can show which identities generated records. Summaries are a triage aid, not a replacement for reading the complete event with ausearch when you need process arguments, the parent process, or the exact return value.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Monitor who changed a file

For a sensitive configuration file, create a file rule with a descriptive key and write/attribute permissions. For example:

-w /etc/example-service/config.yml -p wa -k example_config
  1. Load the persistent policy through the supported rule workflow.
  2. Verify the line appears once in auditctl -l.
  3. Make a controlled edit as the account that normally administers the service.
  4. Run sudo ausearch -k example_config --start recent -i.
  5. Correlate the PATH, SYSCALL, EXECVE, and related records. Check the effective UID, login UID, process ID, executable, command arguments, and success value.

The login UID can identify the original authenticated account even when a process changes its effective UID, while the effective UID describes the credentials used for the operation. Keep both distinctions in mind when investigating a privileged edit. If the file is replaced atomically, the event may involve a temporary file and rename rather than a simple write to the final pathname; inspect the complete event and watch the relevant directory or operation when your investigation requires that detail.

Control log growth on a small VPS

Audit logging consumes disk, CPU, and some memory for buffering. There is no universal safe event rate: an idle VPS and a busy build host can produce very different volumes. Measure your own workload after enabling each rule family.

  • Start narrow. Prefer a few high-value file watches and carefully filtered syscall rules over indiscriminate syscall logging.
  • Watch the backlog. Check auditctl -s for backlog pressure and review service messages when events are lost or delayed.
  • Measure records. Compare a fixed time window with ausearch and inspect the size of the audit log directory with the system’s disk-usage tools.
  • Configure rotation. In /etc/audit/auditd.conf, review the log path, maximum file size, number of retained files, and the action taken when space is low, the disk is full, or a write fails.
  • Reserve space. Ensure the filesystem holding audit logs has capacity for bursts as well as normal traffic. A policy that works during quiet hours can fill a small volume during deployment or an attack.
  • Choose failure behavior deliberately. Backlog, rate-limit, and failure-mode settings trade availability against evidence. Document the choice and test the operational consequence on a non-production VPS.

Do not quote a generic CPU or disk percentage as a guarantee. The cost depends on the selected syscalls, path activity, process rate, kernel, storage, and workload. Recheck volume after application, package, or deployment changes.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep audit records useful and defensible

Protect local audit files with restrictive ownership and permissions, and ensure ordinary application accounts cannot rewrite them. Limit administrative access to the tools and configuration. If the VPS is part of an incident-response program, forward records to a protected central destination so that compromise of the VPS does not erase the only copy. Central forwarding adds network, queue, and retention dependencies; monitor those dependencies and keep a local buffer sized for an outage.

Use meaningful, stable keys rather than a different label for every minor edit. A key should describe the investigative purpose, such as identity, ssh_config, or privilege_config. Keep a short policy document that maps each key to the files or operations it covers and states who owns the review.

Distribution differences and common failure modes

The rule is in a file but not active

Check whether the fragment has a valid filename and syntax, whether augenrules compiled it, and whether the service reload method for that release was used. Compare the generated rules with auditctl -l. A direct edit to a generated file can be overwritten at the next reload.

The same event appears many times

Look for duplicate fragments, an existing vendor rule, and overlapping file and syscall rules. Remove redundant coverage or give each intentional family a distinct key. Do not solve duplication by ignoring records after the fact; reduce the policy at its source.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A file change was not recorded

Confirm that the changed object is the watched path, not a symbolic-link target or an atomically replaced file. Check that the selected permissions include the operation, that the event time falls inside the search window, and that the rule remained loaded. Review the complete event for a rename or directory operation.

The VPS becomes unstable after enabling auditing

First reduce broad syscall coverage and examine backlog, rate, and disk-space messages. Restore a narrow baseline, measure the workload, and add one rule family at a time. If the policy uses a failure mode that can block or halt work when records cannot be written, follow the documented recovery procedure for that distribution rather than deleting rules blindly.

Restart commands fail

Some distributions deliberately restrict stopping or restarting the audit daemon. Read the installed auditd, auditctl, and service-manager manual pages and use the supported reload or boot-time workflow. A failed restart does not necessarily mean that the existing policy stopped auditing.

A maintainable auditd workflow

  1. Define the security questions and retention requirement for the VPS.
  2. Install the audit package and verify the daemon and utilities.
  3. Inspect current status and rules before adding anything.
  4. Create one numbered fragment in /etc/audit/rules.d/ with narrow scope and descriptive keys.
  5. Compile and load it through the distribution-supported mechanism.
  6. Generate a known test event and verify it with ausearch.
  7. Use aureport for scheduled summaries and ausearch for investigations.
  8. Measure event volume, backlog, and disk consumption on the real workload.
  9. Review rule usefulness after application, package, and infrastructure changes.
  10. Forward records to protected central storage when local-only evidence is not sufficient.

This process keeps auditd focused on kernel-generated security evidence, makes searches repeatable, and avoids turning a small VPS into an unmanageable stream of low-value records.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.