View previous topic :: View next topic |
Author |
Message |
o5gmmob8 Guru

Joined: 17 Oct 2003 Posts: 583
|
Posted: Tue Mar 18, 2025 4:42 pm Post subject: [SOLVED] prevent more devices from being added via USB |
|
|
How would I lock down USB such that after all the devices are plugged in, I can prevent new ones from being added? I would want to prevent any additional kernel modules from being loaded. Would I control that via udev?
I don't want to unload USB entirely, but I'm sure that would work while at the same time, whatever is connected, wouldn't.
EDIT:
I came across this in an old system configuration I had many years ago:
Code: | # by default, do NOT authorize USB devices
for d in $(ls /sys/bus/usb/devices/ | grep "usb.*")
do
echo 0 > /sys/bus/usb/devices/$d/authorized_default
done |
Unforrtunately, I'm not seeing any sort of authorized file.
Last edited by o5gmmob8 on Tue Mar 18, 2025 6:58 pm; edited 1 time in total |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55179 Location: 56N 3W
|
Posted: Tue Mar 18, 2025 6:22 pm Post subject: |
|
|
o5gmmob8,
Code: | $ ls -l /sys/bus/usb/devices/usb1/
total 0
drwxr-xr-x 10 root root 0 Mar 18 18:15 1-0:1.0
drwxr-xr-x 7 root root 0 Mar 18 18:19 1-4
drwxr-xr-x 6 root root 0 Mar 18 18:15 1-5
-rw-r--r-- 1 root root 4096 Mar 18 18:16 authorized
-rw-r--r-- 1 root root 4096 Mar 18 18:16 authorized_default
... |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
o5gmmob8 Guru

Joined: 17 Oct 2003 Posts: 583
|
Posted: Tue Mar 18, 2025 6:58 pm Post subject: |
|
|
Oh, yes, you're right, hmm, I need to play around more with find then. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|