LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-18-2021, 04:43 PM   #1
ccj4467
Member
 
Registered: Jan 2009
Posts: 34

Rep: Reputation: 5
Question loading Kernel Modules.


I have an interesting dilemma. In order to meet certain security requirements I need to blacklist and unload the kernel module for USB storage. Unfortunately sometimes we need to get a file from a USB device.

Is it possible manually load the blacklisted kernel module and then mount the USB device.

Last edited by ccj4467; 03-18-2021 at 04:48 PM.
 
Old 03-18-2021, 04:56 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Sure.
After blacklisting you shouldn't need to unload - to me that implies a udev is probably firing. In which case anybody inserting a USB will automatically load it. There was a recent thread that mentioned tool(s) that might help.

Later: have a look at this thread. usbguard seems to be the suggestion.

Last edited by syg00; 03-18-2021 at 05:03 PM.
 
Old 03-18-2021, 04:56 PM   #3
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
What stops you from trying? I often read posts like this and wonder, why has someone else to try out and reply. To my knowledge blacklisting only disables autoloading, not manual load.
 
Old 03-19-2021, 06:39 AM   #4
ccj4467
Member
 
Registered: Jan 2009
Posts: 34

Original Poster
Rep: Reputation: 5
Thanks everybody, I will take a look at usbguard. I have come up with a rather inelegant solution with a shell script. Basically to enable usb storage I rename the blacklist config file do a modprobe to load the module. Disabling is the reverse. The only problem is we also have to disable automounting so we have to manually mount the usb device, not really ideal but doable.

I am marking this thread solved
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading modules error after loading compiled kernel td0l2 Linux - Newbie 12 07-28-2004 11:10 AM
modules are loading that shouldn't in my rc.modules thrice Slackware 3 05-11-2004 10:35 PM
loading modules w/o rc.modules e1000 Slackware 3 01-09-2004 02:57 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - General 1 01-24-2002 01:50 AM
Re: modprobe: Note: /etc/modules.conf is more recent than lib/modules/2.4.9/modules.d Andy.M Linux - Newbie 2 01-24-2002 01:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration