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

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

berkey
31448
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 ♦♦
17.1k957245
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 ♦♦
17.4k335196
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

oops13
112
accept rate: 0%

edited 28 Oct '13, 05:16

I just commented out the dialog line.

From:

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

To:

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

permanent link

answered 07 Dec '14, 11:48

Kennybobs's gravatar image

Kennybobs
111
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×832
×431

question asked: 23 Dec '12, 03:53

question was seen: 78,453 times

last updated: 07 Dec '14, 11:48

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