Skip to content

1.1.9 Disable Automounting

Audit#

As a preference autofs should not be installed unless other packages depend on it.

Run the following command to verify autofs is not installed:

# systemctl is-enabled autofs
Failed to get unit file state for autofs.service: No such file or directory

Run the following command to verify autofs is not enabled if installed:

# systemctl is-enabled autofs
disabled

Verify result is not "enabled"

Remediation#

If there are no other packages that depends on autofs, remove the package with:

# apt purge autofs

OR if there are dependencies on the autofs package: Run the following commands to mask autofs:

# systemctl stop autofs
# systemctl mask autofs