This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

error when running wireshark on Ubuntu as non root user

0

hi all,

When I issue "sudo wireshark -i eth0" on my ubuntu 12.04, a error window occur said "Lua: Error during loading: [string "/usr/share/wireshark/init.lua"]: 45:dofile has been disabled."

What does it mean and how to resolve this issue?

thanks!

asked 20 Mar '13, 06:26

SteveZhou's gravatar image

SteveZhou
191273034
accept rate: 0%

edited 10 Sep '13, 04:58

grahamb's gravatar image

grahamb ♦
19.8k330206


One Answer:

4

What does it mean and how to resolve this issue?

it means, you shall not run Wireshark as root (for security reasons). See here:

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

Regards
Kurt

answered 20 Mar '13, 09:17

Kurt%20Knochner's gravatar image

Kurt Knochner ♦
24.8k1039237
accept rate: 15%

So with the default installation, I can capture packets as root? I need to reinstall wireshark to allow non-root users to capture packets? But I didn't find a installation process for this.

(09 Sep '13, 23:06) SteveZhou

What is you OS?

(09 Sep '13, 23:27) Kurt Knochner ♦

From the question: Ubuntu 12.04

So the user should follow the Debian install guidelines here

(10 Sep '13, 02:07) grahamb ♦

ah, it's the same user. I did not check, as my answer was so old :-))

(10 Sep '13, 03:55) Kurt Knochner ♦

I need to reinstall wireshark to allow non-root users to capture packets?

No. Just run the following command (as documented in the link I posted in my answer):

sudo setcap 'CAP_NET_RAW+eip CAP_NET_ADMIN+eip' /usr/bin/dumpcap

Then run Wireshark as a non root user and you should see the interfaces.

The same is true for dumpcap.

dumpcap -D -M

will show interfaces, if run as non root user, only after the setcap command.

(10 Sep '13, 04:08) Kurt Knochner ♦

really helpful, it's working! thank you so much!

(13 Sep '13, 02:55) SteveZhou
showing 5 of 6 show 1 more comments