Tiny Core Base > CorePlus
I want to disable USB Drive
Rich:
Hi malikawan
Some ideas found from:
https://www.mjmwired.net/kernel/Documentation/kernel-parameters.txt
Do you require any USB support? If not, the boot code:
--- Code: ---usbcore.nousb
--- End code ---
should disable the whole USB subsystem.
Or, try the following boot code set to 0
--- Code: ---usbcore.authorized_default=
[USB] Default USB device authorization:
(default -1 = authorized except for wireless USB,
0 = not authorized, 1 = authorized)
--- End code ---
If those don't work, try adding this to your /opt/bootlocal.sh file:
--- Code: ---echo 3600 > /sys/module/usb_storage/parameters/delay_use
--- End code ---
Now if someone plugs in a USB device, it will take an hour before before it gets scanned and is usable.
malikawan:
Hi Rich
Thanks the last one works like a charm
If those don't work, try adding this to your /opt/bootlocal.sh file:
echo 3600 > /sys/module/usb_storage/parameters/delay_use
Rich:
Hi malikawan
You are welcome. Bear in mind that:
IF
the user has access to a keyboard
AND
has root access (sudo)
AND
knows how you increased the USB detection delay
THEN
they could undo the delayed USB detection.
It will however keep the average user out which is whom I presume you are targeting.
malikawan:
Hi
When i plug usb and restart it will never add delay and is available to mount. But when i unplug the usb and plug again then its not available. Means if user connect usb and start PC then it will be able to mount usb.
Any idea to remove usb if user attach at startup.
Rich:
Hi malikawan
We could try it as a kernel parameter instead so it occurs earlier. Try the boot code:
--- Code: ---usb-storage.delay_use=3600
--- End code ---
Navigation
[0] Message Index
[*] Previous page
Go to full version