Answer the question
In order to leave comments, you need to log in
Is it possible to restrict access to usb-carriers with exceptions by regular means?
Good afternoon, the task is to block access to usb-carriers, with the exception of a few certain ones, there are no problems with complete blocking, but how to solve with permission for certain ones, let's say by their s / n, using only the standard OS capabilities. Please share if anyone has experience with this configuration.
Answer the question
In order to leave comments, you need to log in
Deny access to usb to everyone and write a script that, for example, will check the list of devices using cron, for example, using lsblk (you can configure verbose output there) and look there for the uuid or label or device ID and mount
and to unmount, allow your sudo unmount to run, let users run the shortcut
rummage in the direction of udev, for example
https://wiki.gentoo.org/wiki/Allow_only_known_usb_...
https://unix.stackexchange.com/q/63199
Of course, this does not make sense if the user has root rights or the ability to get.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question