如何在 Trusty 14.04 中无需以 root 身份运行即可启用 Wireshark

Jan*_*hou 54 networking wireshark 14.04

我安装了Wireshark。不建议以 root 身份运行,因此

我做了

sudo dpkg-reconfigure wireshark-common
Run Code Online (Sandbox Code Playgroud)

根据:

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.
Run Code Online (Sandbox Code Playgroud)

我想我遵循了配置 Wireshark 的推荐方式,它在 13.10 中有效,在 14.04 中无效

仅供参考,重新配置wireshark-common 实际上是将dumpcap 的组设置为Wireshark。还是不行。我查了一下。

14.04应该怎么做?

小智 80

运行后发现:

sudo dpkg-reconfigure wireshark-common
Run Code Online (Sandbox Code Playgroud)

wireshark创建了一个组/etc/gshadow。所以我只写了:

sudo gpasswd -a $USER wireshark
Run Code Online (Sandbox Code Playgroud)

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

  • 无需注销/登录,只需以普通用户的身份输入 `newgrpwireshark`,它速度更快,并且在我使用 18.04 的经验中也是如此。 (2认同)

Thu*_*asa 26

是的,你做对了。但是有些东西丢失了。如果您看到错误消息,例如couldn't run /usr/bin/dumpcap in child process: Permission Denied.Go to terminal and

sudo dpkg-reconfigure wireshark-common
Run Code Online (Sandbox Code Playgroud)

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

sudo adduser $USER wireshark
Run Code Online (Sandbox Code Playgroud)

然后重启你的机器并打开wireshark。有用。

  • 您不必重新启动。注销/登录就可以了。 (4认同)
  • 我不得不重新启动 - 登录/退出不起作用(ubuntu 16.10-64 位) (2认同)