Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #231679

Re: Allow only selected USB

From Toni Mas Soler <antomassol@protonmail.com>
Newsgroups linux.debian.user
Subject Re: Allow only selected USB
Date 2021-02-13 01:20 +0100
Message-ID <BHQPf-6K7-1@gated-at.bofh.it> (permalink)
References <BGG5z-4Fi-1@gated-at.bofh.it> <BGGff-4IJ-7@gated-at.bofh.it> <BGHbj-5iv-3@gated-at.bofh.it> <BGJPP-6Zx-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Alternatively, if you run udev, you can add new rule.
Fixed: /etc/udev/rules.d
Volatile: /run/udev/rules.d

I believe this example is autoexplained:
  8 # Do not use this rule if I'm not a USB
  9 SUBSYSTEM!="usb", GOTO="usbgend"
 10 # Only verify on plugin
 11 ACTION=="remove", GOTO="usbgend"
 12
 13 # Select what you want accept by one attributes
 22 SUBSYSTEM=="usb", ACTION=="add", ATTRS{manufacturer}=="PixArt", ATTRS{product}=="USB Optical Mouse", \
 23   ATTRS{idVendor}=="0AEa", ATTRS{idProduct}=="2EE0", ATTRS{bDeviceClass}=="00", ATTR{authorized}="1", GOTO="usbgend"
 24
 25 # Select what you want accept by other attributes
 30 ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0124", ATTRS{idProduct}=="4312", ATTR{authorized}="1", GOTO="usbgend"
 31
 35 # Deactivate other USBs
 36 SUBSYSTEM=="usb", ACTION=="add", ATTR{authorized}="0"
 37
 38 LABEL="usbgend"

 Regards,

Toni Mas
GPG 3F42A21D84D7E950

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
En dimarts 9 de febrer de 2021 a les 23:31, Bhasker C V <bhasker@unixindia.com> va escriure:

> Fantastic ! thanks a ton ! thanks !  exactly what i was looking for
> 

> On Tue, Feb 9, 2021 at 7:43 PM <l0f4r0@tuta.io> wrote:
> 

> > Hi,
> > 

> > 9 févr. 2021, 19:44 de mailinglist@darac.org.uk:
> > 

> > > Certainly. > https://www.kernel.org/doc/html/latest/usb/authorization.html
> > >
> > + https://usbguard.github.io based on it.
> > 

> > Best regards,
> > l0f4r0

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Allow only selected USB Bhasker C V <bhasker@unixindia.com> - 2021-02-09 19:40 +0100
  Re: Allow only selected USB Darac Marjal <mailinglist@darac.org.uk> - 2021-02-09 19:50 +0100
    Re: Allow only selected USB l0f4r0@tuta.io - 2021-02-09 20:50 +0100
      Re: Allow only selected USB Bhasker C V <bhasker@unixindia.com> - 2021-02-09 23:40 +0100
        Re: Allow only selected USB Toni Mas Soler <antomassol@protonmail.com> - 2021-02-13 01:20 +0100

csiph-web