I'm trying to use wireshark on a Debian machine, but when I run it with my non-root user account, it doesn't detect any network interface.

I also tried running wireshark as root, but wireshark tells me this method is insecure.

I also read the FAQ and found "read the file on /usr/shared/wireshark-common/README.Debian file" - I did read that file, but I still don't know what I'm supposed to do.

link|improve this question
feedback

1 Answer

up vote 3 down vote accepted

By installing Wireshark packages non-root users won't gain rights automatically to capture packets.

You need root privileges to capture traffic with Wireshark (or dumpcap, for that matter). According to the manual you mentioned, it should be possible to add your user to the wireshark group though:

useradd -G wireshark your-user-name

Don't know if that alone will work though. Here's also a guide from Wireshark Blog that explains it a bit more:

sudo -s
groupadd -g wireshark
usermod -a -G wireshark your-user-name
chgrp wireshark /usr/bin/dumpcap
chmod 4750 /usr/bin/dumpcap

That being said, you can safely run Wireshark to inspect, edit or filter packet dumps without root privileges.

link|improve this answer
Thanks for the details=) Also, I learnt that I should reboot before going 'Y U NOT WORKING'. Now it works brilliantly!!! – user269334 Aug 8 '11 at 16:58
That's perfect, glad I could help. Rebooting normally shouldn't be necessary, logging out and in should in most cases fix issues. – slhck Aug 8 '11 at 17:00
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.