在ubuntu11.10以后版本中发现,安装wireshark后用root权限启动,弹出如下错误:
Running as user “root” and group “root”. This could be dangerous.
Lua: Error during loading: [string "/usr/share/wireshark/init.lua"]:45: dofile has been disabled
通过google查找问题,说是在ubuntu下存在该bug,解决办法是以普通用户启动wireshark。为了能以普通用户身份通过wireshark抓包,需要作如下操作:
sudo chgrp txg /usr/bin/dumpcap
sudo chmod 750 /usr/bin/dumpcap
sudo setcap cap_net_raw,cap_net_admin+eip /usr/bin/dumpcap
运行以上命令后,以普通用户身份启动wireshark即可。