This is our old Q&A Site. Please post any new questions and answers at

Whenever i try to analyze packets using tshark on Ubuntu with root permission i got the following error, however when i switch to user profile (su berkey), there is no problem. Why this occurs? is there a solution?

tshark: Lua: Error during loading: [string "/usr/share/wireshark/init.lua"]:45: dofile has been disabled Running as user "root" and group "root". This could be dangerous.

asked 23 Dec '12, 03:53

berkey's gravatar image

accept rate: 0%

edited 23 Dec '12, 03:53

If you're not using any lua scripting with Tshark, then all is fine. Tshark just protects you from running a script (with endless possibilities to mess up your system if programmed badly) with root privileges. You can ignore the warning in that case.

If you do run lua scripts, it is strongly advised to change your system to be able to do capturing and analysis without root privileges.

If you do need to run Tshark with root privileges and lua scripts, then you need to patch the Tshark source code to remove the root-check...

permanent link

answered 23 Dec '12, 04:17

SYN-bit's gravatar image

SYN-bit ♦♦
accept rate: 20%

thanks i don't use any Lua commands. Your answer solved my question.

(23 Dec '12, 08:52) berkey

Whenever i try to analyze packets using tshark on Ubuntu with root permission

Don't do that. Instead, give dumpcap the privileges it needs to capture traffic without requiring root privileges.

permanent link

answered 24 Dec '12, 02:37

Guy%20Harris's gravatar image

Guy Harris ♦♦
accept rate: 19%

fix lua error:

cd /usr/share/wireshark

nano init.lua

line #29 change to:

disable_lua = true

permanent link

answered 28 Oct '13, 05:15

oops13's gravatar image

accept rate: 0%

edited 28 Oct '13, 05:16

I just commented out the dialog line.


dofile = function() error("dofile has been disabled") end


-- dofile = function() error("dofile has been disabled") end

permanent link

answered 07 Dec '14, 11:48

Kennybobs's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 23 Dec '12, 03:53

question was seen: 80,818 times

last updated: 07 Dec '14, 11:48

p​o​w​e​r​e​d by O​S​Q​A