rss feed Twitter Page Facebook Page Github Page Stack Over Flow Page

Disable Autofs

You can disable autofs if you don't need it. This will prevent to mount automatically removable media or NFS filesystems.

You can simply write an udev rule to disable automounting.

First, create the file /etc/udev/rules.d/85-no-automount.rules

sudo vi /etc/udev/rules.d/85-no-automount.rules

and add the following lines:

SUBSYSTEM=="usb", ENV{UDISKS_AUTO}="0"

Restart the service:

sudo service udev restart

This will prevent any USB device from being mounted by the udisksd daemon. If the service didn't work, you might need to reboot the server.