如何启用Wireshark而不在Trusty 14.04中以root身份运行

我安装了Wireshark。 不推荐以root身份运行

我做了

sudo dpkg-reconfigure wireshark-common 

根据:

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

http://anonscm.debian.org/viewvc/collab-maint/ext-maint/wireshark/trunk/debian/README.Debian?view=markup

已回答是,退出已启动Wireshark并收到此消息:

 couldn't run /usr/bin/dumpcap in child process: Permission Denied. 

我认为我遵循了配置Wireshark的推荐方式,它在13.10中工作,但在14.04中没有

仅供参考,重新配置wireshark-common实际上是将dumpcap组设置为Wireshark。 它仍然无效。 我查了一下。

应该如何在14.04完成?

跑完后我发现:

 sudo dpkg-reconfigure wireshark-common 

/etc/gshadow创建了wireshark组。 所以我写道:

 sudo gpasswd -a $USER wireshark 

和注销/登录,现在它工作正常!

是的,你做对了。 但是有些东西丢失了。如果你看到错误信息就像couldn't run /usr/bin/dumpcap in child process: Permission Denied 。转到终端并且

 sudo dpkg-reconfigure wireshark-common 

选择答案为“ YES ”。然后将用户添加到组中

 sudo adduser $USER wireshark 

然后重新启动机器并打开wireshark。 有用。

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

检查这个问题