Handbook sections▾
Foundations
Understanding the threats to a Linux hostWhy we hardenThe defense principles behind every ruleEffective configuration: the truth no file holdsThe standards Pavois maps toSOCLE control ID modelEvidence & exportsHow the A-E grade is computedWhat a PASS proves: the qualified verdictTrust model for the evidence bundleIs SOCLE just your own norm? (governance & the circularity question)What Pavois covers, and what it doesn'tDomains
Hardening SSHHardening PAMMandatory Access Control (SELinux / AppArmor)Hardening the host firewallHardening sudoFile Permissions & OwnershipMount & filesystem hardeningHardening kernel modulesHardening the kernel & network with sysctlAudit logging with auditdHardening logging with journald and rsyslogHardening systemd servicesPackage hygieneHardening the bootloader (GRUB)Synchronizing timeLogin banners and MOTDControlling cron and at accessHardening the GNOME desktop (dconf)Tooling
Undo a hardening run: restore pointsOperating Pavois: privileges, air-gap, timing, exceptionsRun Pavois in CI (GitHub Actions)Feature status: delivered, partial, roadmapGovernance: licence, versioning, provenance, securityHardening the GNOME desktop (dconf)
Last reviewed
On workstations, lock the GNOME settings with dconf so a user, or malware in their session, can't weaken the desktop's defenses (screen lock, removable media, login banner).
The threat: the desktop session is where phishing lands
A workstation is a favourite foothold: a phishing click or a malicious document runs in the user's desktop session. From there, weak desktop defaults help the attacker: automatically mounting and auto-running removable media (the classic USB-drop), an unlocked screen on an unattended machine, or a GDM login that enumerates every username for an attacker to spray. And because these are user settings, a normal user (or code running as them) can usually flip them back.
Why harden it
Desktops are where humans, and therefore phishing and removable media, meet the network. Hardening GNOME shrinks that surface and, crucially, locks the safe settings system-wide so they cannot be reverted per user. The desktop becomes a controlled, predictable baseline rather than 200 differently-configured machines.
How dconf enforcement works
dconf is a layered settings store, and the security comes from the system database plus locks, not from per-user keyfiles:
- A profile (
/etc/dconf/profile/user) tells each session to read a system database under the user's own:user-db:userthensystem-db:local. - Keyfiles under
/etc/dconf/db/local.d/set the hardened values (INI-style, grouped by schema path). - Lock files under
/etc/dconf/db/local.d/locks/list the keys a user may read but not override. This is what turns a suggestion into enforcement. dconf updatecompiles the text keyfiles into the binary database. Nothing applies until you run it.
# /etc/dconf/db/local.d/00-security
[org/gnome/desktop/screensaver]
lock-enabled=true
lock-delay=uint32 5
[org/gnome/desktop/session]
idle-delay=uint32 300
[org/gnome/desktop/media-handling]
automount=false
automount-open=false
autorun-never=true
# /etc/dconf/db/local.d/locks/00-security
/org/gnome/desktop/screensaver/lock-enabled
/org/gnome/desktop/media-handling/automountThen dconf update. For the GDM greeter, set org.gnome.login-screen disable-user-list=true and banner-message-enable=true with banner-message-text, and disable any guest session.
Defense principles applied
- Secure defaults: disable
automount/automount-openand setautorun-never; enable the screen lock with a short idle delay; show the login banner; hide the user list at GDM. - Enforce, don't suggest: back each setting with a dconf lock so a user can read but not override it.
- Accountability: a warning banner at the GDM login screen states monitored, authorized access.
What Pavois audits: the effective dconf database
Pavois reads the effective dconf database (the resolved value a session actually gets, not just a keyfile), so it sees system defaults and locks as GNOME applies them. Across its GNOME/dconf rules it checks: the GDM login banner enabled and its message text, removable-media automount/automount-open disabled and autorun-never set, the idle screen lock enabled with a bounded delay, and that each is locked so users can't undo it.
Verify
# the resolved value the session gets:
dconf read /org/gnome/desktop/screensaver/lock-enabled # true
gsettings get org.gnome.desktop.media-handling automount # false
# is it locked? a locked key cannot be changed by the user:
dconf write /org/gnome/desktop/screensaver/lock-enabled false # fails / no effect when locked
machinectl shell user@ -- gsettings get org.gnome.login-screen disable-user-listPitfalls
- Forgetting
dconf update: edits to keyfiles do nothing until the binary database is recompiled. - Setting without locking: a value the user can change back is not hardening. Add the matching entry under
locks/. - No profile, no system db: if
/etc/dconf/profile/userdoesn't referencesystem-db:local, the keyfiles are never read. - Type matters:
uint32 300,true/false, quoted strings; a wrong type makes the key silently ignored. - Headless servers don't run GNOME: these controls apply to workstations; they are not relevant on a server without a desktop.
FAQ
Why lock the keys instead of just setting them? Because dconf values are user-writable by default; without a locks/ entry the user (or malware in the session) reverts them. The lock makes the system value authoritative.
My keyfile change had no effect. You likely skipped dconf update, or the user profile doesn't include system-db:local. Check both.
Why does Pavois read the resolved value, not the keyfile? Because layering and locks decide what a session actually receives; the effective database is the truth, a keyfile on disk is only an input.