I want to block a certain driver module from loading in the linux kernel. So I created a file in /etc/modprobe.d/cdc_acm.conf. In this file I added the following line:

install cdc_acm /bin/false

This works as expected when issuing:

modprobe cdc-acm

libkmod: ERROR libkmod/libkmod-module.c:924
command_do: Error running install command for cdc_acm ERROR: could not
insert 'cdc_acm': Operation not permitted

The problem is that when I use the insmod utility the module is loaded:

insmod cdc-acm.ko

[ 1051.914578] cdc_acm 2-1.1:1.0:
usb_probe_interface [ 1051.919437] cdc_acm 2-1.1:1.0:
usb_probe_interface - got id [ 1051.926323] cdc_acm 2-1.1:1.0:
ttyACM0: USB ACM device [ 1051.934700] usbcore: registered new
interface driver cdc_acm [ 1051.941315] cdc_acm: USB Abstract Control
Model driver for USB modems and ISDN adapters

Why is this happening is there a way to create a blacklist file for insmod ?

  • 1
    Does rm cdc-acm.ko do what you want? insmod is supposed to work at a lower level than modprobe and pretty much just assume that you know what you are doing. You will get the same result from insmod - < cdc-acm.ko without insmod having any idea that you are loading cdc-acm.ko.
    – user
    Commented May 15, 2013 at 13:02
  • I need to have the driver on the filesystem, but to disable accidental loading of the driver, so I can't remove it.
    – Diurpaneus
    Commented May 15, 2013 at 13:57

1 Answer 1


The blacklist is read by modprobe where insmod just tries to insert a module without bothering with dependencies or blacklists or anything.

insmod man page:

insmod is a trivial program to insert a module into the kernel. Most users will want to 
use modprobe(8) instead, which is more clever and can handle module dependencies.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .