Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 6248  / 2 Years ago, tue, october 11, 2022, 2:34:22

By default, all hard drive and usb drive devices belong to group "disk". I want to change usb drives to group "adm".



I verified the ID_BUS



$ udevadm info -q all -n /dev/sdb | grep ID_BUS
E: ID_BUS=usb


I created the file /etc/udev/rules.d/70-persistent-usb.rules and insert the following



# Enable admin controls on all usb devices.
ID_BUS=="usb", GROUP="adm"


Lastly, I disconnected my usb drive and reconnected it. It is still showing



$ ll /dev/sdb
brw-rw---- 1 root disk 8, 16 Apr 14 19:31 /dev/sdb


The drive group is not "adm"? What am I doing wrong?


More From » usb

 Answers
1

In the udevadm info output, you see the E prefix which is used for environment variables. You can match against it with:



ENV{ID_BUS}=="..."


If you are trying to make just USB devices writable, see this recent question on Unix.SE:




[#26021] Tuesday, October 11, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
igeonlothe

Total Points: 370
Total Questions: 121
Total Answers: 114

Location: United States Minor Outlying Island
Member since Fri, Feb 5, 2021
3 Years ago
;