54

I installed Wireshark. Running as root is not recommended, so

I Did

sudo dpkg-reconfigure wireshark-common

According to:

http://wiki.wireshark.org/CaptureSetup/CapturePrivileges

http://anonscm.debian.org/viewvc/collab-maint/ext-maint/wireshark/trunk/debian/README.Debian?view=markup

Answered Yes, Logout out Started Wireshark and got this message:

couldn't run /usr/bin/dumpcap in child process: Permission Denied.

I think I followed the recommended way of configuring Wireshark, it worked in 13.10, it doesn't in 14.04

FYI, reconfiguring wireshark-common is actually setting the group for dumpcap to Wireshark. Still it doesn't work. I checked that.

How should it be done in 14.04?

Janghou
  • 5,499
  • 6
  • 43
  • 59
  • I guess you've already checked that you, the user, are in the wireshark group – Akronix May 01 '14 at 09:03
  • Yes. that said, I stumble on this `groups $USER` does list wireshark `groups $user` does NOT list wireshark – Janghou May 01 '14 at 09:14
  • 1
    possible duplicate of [How do I run wireshark, with root-privileges?](http://askubuntu.com/questions/74059/how-do-i-run-wireshark-with-root-privileges) – Eric Carvalho Apr 08 '15 at 12:41
  • 1
    Simply run this: sudo usermod -aG wireshark $USER. Then, log out and back in again. – l3x Nov 08 '18 at 20:46

3 Answers3

81

I found that after running:

sudo dpkg-reconfigure wireshark-common

a wireshark group been created in /etc/gshadow. So I just wrote:

sudo gpasswd -a $USER wireshark

and logout/login and now it works fine!

heemayl
  • 90,425
  • 20
  • 200
  • 267
user278162
  • 811
  • 5
  • 2
26

Yes, you did correct. But some thing is missing.If you see the error message like couldn't run /usr/bin/dumpcap in child process: Permission Denied.Go to terminal and

sudo dpkg-reconfigure wireshark-common

choose answer as "YES" .Then add user to the group by

sudo adduser $USER wireshark

Then restart your machine and open wireshark. It works.

heemayl
  • 90,425
  • 20
  • 200
  • 267
Thusitha Sumanadasa
  • 1,486
  • 12
  • 14
3
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap

Check this question

Mohammad Reza Rezwani
  • 10,076
  • 35
  • 91
  • 127