First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Error permissions on usb device on Ubuntu 20.04.4 LTs

Im on ubuntu 20.04 and im facing permissions problem to capture traffic from usb device. Ive made all the things they told me, im on wireshark group and made reconfigure many times to allow non superusers be able to capture traffic.

Any help would be apreciated

Error: The capture session could not be initiated on interface 'usbmon1' (You don't have permission to capture on that device). Please check to make sure you have sufficient permissions.

On Debian and Debian derivatives such as Ubuntu, if you have installed Wireshark from a package, try running

sudo dpkg-reconfigure wireshark-common

selecting "<yes>" in response to the question

Should non-superusers be able to capture packets?

adding yourself to the "wireshark" group by running

sudo usermod -a -G wireshark {your username}

and then logging out and logging back in again.

eduardo74's avatar
1
eduardo74
asked 2022-05-01 17:53:39 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

There is an extra step for the USB devices:
USB capture setup: Linux

To give regular users privileges, make the usbmonX device(s) readable:

sudo setfacl -m u:$USER:r /dev/usbmon*

(Sniff usb with non-root user under Ubuntu 18.04)

Chuckc's avatar
3k
Chuckc
answered 2022-05-01 18:21:03 +0000, updated 2022-05-01 18:22:07 +0000
edit flag offensive 0 remove flag delete link

Comments

But every time i reboot i have to execute this instrucion....is possible to make it "forever" ? Thanks

eduardo74's avatar eduardo74 (2022-05-14 18:43:08 +0000) edit

The device files (/dev/usbmon*) don't exist until the usbmon kernel module is loaded.
The kernel docs (usbmon) mention compiling it into the kernel but that's not something covered here.
If you look around, other have encountered this with setfacl and created startup scripts to load the kernel module and set the permissions.
Here is a different method that set group information on the files: Capturing USB Serial data using wireshark

Chuckc's avatar Chuckc (2022-05-15 16:20:38 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer