How to enable Wireshark without running as root in Trusty 14.04
Solution 1
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!
Solution 2
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.
Solution 3
sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap
Related videos on Youtube
Janghou
Updated on September 18, 2022Comments
-
Janghou over 1 year
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
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?
-
Akronix about 10 yearsI guess you've already checked that you, the user, are in the wireshark group
-
Janghou about 10 yearsYes. that said, I stumble on this
groups $USER
does list wiresharkgroups $user
does NOT list wireshark -
Eric Carvalho about 9 yearspossible duplicate of How do I run wireshark, with root-privileges?
-
l3x over 5 yearsSimply run this: sudo usermod -aG wireshark $USER. Then, log out and back in again.
-
-
Francisco Corrales Morales almost 8 yearsNow I can see all the Interfaces, but the error messages still showing up when the program is starting.
-
heemayl almost 8 yearsYou don't have to restart. Logging out/in would do.
-
Thanos over 7 yearsDon't forget to add the "-a" parameter to the adduser command.
-a, --add USER add USER to GROUP
-
TmTron about 7 yearsI had to restart - login/out did not work (ubuntu 16.10-64bit)
-
Hack-R over 6 yearsThree cheers. This should be marked as the solution but OP probably abandoned the thread.
-
Nicolas Raoul almost 6 yearsInstead of logout/login, just type
newgrp wireshark
as your normal user, it is faster, and works the same in my experience with 18.04. -
Abhay Sehgal about 5 yearsYeah it works, can you please explain above commands in detail, or can provide any link?
-
Abhay Sehgal about 5 yearsYeah it works, can you please explain above commands in detail, or can provide any link?
-
Detained Developer over 4 yearsWorks 101% Thanks!