Description
AIDE needs a reference database, /var/lib/aide/aide.db, built with aideinit from the
current state of the system. aide-common then ships dailyaidecheck.timer, which compares the
files with the database once a day and writes a report to /var/log/aide/ (and mails it when a
mail transport is installed).
This control requires the database to exist and the timer to be enabled.
Build the database once the system is in its intended state: run this fix after the other
hardening fixes, or rebuild the database afterwards with aideinit -y -f, otherwise the first
reports list every change made by the hardening.
Rationale
The database is the trusted reference; the daily check turns it into detection. Without either, an installed AIDE gives a false sense of protection.
Impact
Building the database reads every covered file: a few minutes and a short burst of disk
activity. The daily check does the same. After legitimate changes (upgrades, configuration),
review the report and update the database (aide --update, then replace aide.db with
aide.db.new).
Setting
| Location | /var/lib/aide/aide.db, dailyaidecheck.timer |
| Default | No database; timer enabled when aide-common is installed |
| Recommended | Database present, timer enabled |
Audit
- Run
ls -l /var/lib/aide/aide.db. The file must exist and not be empty. - Run
systemctl is-enabled dailyaidecheck.timer. It must printenabled. - Read the last report in
/var/log/aide/and check that differences are explained.
Automated: every check must pass. Scanners report each check by its id.
database
The AIDE reference database exists.
script: |
if [ -s /var/lib/aide/aide.db ]; then
ls -l /var/lib/aide/aide.db
else
echo "/var/lib/aide/aide.db missing or empty"
exit 1
fi
timer
dailyaidecheck.timer is enabled.
unit: dailyaidecheck.timer
state: enabled
Remediation
- Run
aideinit -y -fand wait for it to finish (a few minutes). - Run
systemctl enable --now dailyaidecheck.timer.
| Restart | none |
| Disruption | low |
Rollback
Run systemctl disable --now dailyaidecheck.timer and delete /var/lib/aide/aide.db.
database
command -v aideinit >/dev/null 2>&1 || { echo "AIDE is not installed" >&2; exit 1; }
# umask 027: aideinit would otherwise create its logs readable by everyone
[ -s /var/lib/aide/aide.db ] || (umask 027; aideinit -y -f)
timer
Generated from check timer: the engine writes the fix for every output, it sets the expected value and the check runs again after.
Handwritten code reads parameters from CB_<NAME> environment variables. Each release turns these fixes into remediate.sh and an Ansible role per profile: dry run by default, a fix runs only when its check fails.
References
- aideinit(8), Debian manual pages Debian, vendor-doc, accessed 2026-10-18
- systemd.timer(5), Debian manual pages Debian, vendor-doc, accessed 2026-10-18
- ANSSI-BP-028 v2.0 - Recommandations de configuration d'un système GNU/Linux (R76) ANSSI, guide, accessed 2026-10-18
Mappings
| Framework | ID | Relation | Note |
|---|---|---|---|
| ANSSI-BP-028 - Recommandations de configuration d'un système GNU/Linux2.0 | R76 | equivalent | |
| NIST SP 800-53 Rev. 55.1.1 | SI-7(1) | related |
How this control relates to the other framework's: equivalent, stricter, looser, partial or related.
Threats mitigated
Related controls
- requires
CB-DEB-AUDIT-032Install the AIDE file integrity checker - requires
CB-DEB-AUDIT-033Check the integrity of the audit tools with AIDE - related
CB-DEB-AUDIT-035Keep a protected copy of the AIDE database
People and lifecycle
| Authors |
|
| Verified | 2026-10-18 by Sn0wAlice on 12, Proxmox VM, Debian 12 genericcloud image, kernel 6.1.0-54-cloud-amd64, BIOS boot. Fails on fresh install; aideinit builds the database in about 2 minutes on 1 GB RAM; dailyaidecheck.timer enabled; daily check run by hand writes 0640 logs. |
| Verified | 2026-10-18 by Sn0wAlice on 13, Proxmox VM, Debian 13 genericcloud image, kernel 6.12.113+deb13-cloud-amd64, BIOS boot. Fails on fresh install; aideinit builds the database in about 2 minutes on 1 GB RAM; dailyaidecheck.timer enabled; daily check run by hand writes 0640 logs. |
| Introduced in | v0.1.0 |
| Created, updated | 2026-10-18, 2026-10-18 |
| Translations | fr |