您的位置:首页 > 其它

【转】Wireshark:“There are no interfaces on which a capture can be done ”

2013-11-29 17:02 239 查看
linux环境下

两种解决方案:

第一种方法:使用root用户登陆
xiaoshancun@xiaoshancun-VM500:~$ sudo wireshark
第二种方法: 通过guid形式使当前普通用户可以运行此程序。
root@xiaoshancun-VM500:~# groupadd -g 130 wireshark

# 新建一个名为wireshark的用户组, 130 是GID,此数字不是固定不变的, 请先查看/etc/group 文件查看最大的GID是多少,然后加1即可。
root@xiaoshancun-VM500:~# usermod -a -G wireshark xiaoshancun
# 将当前用户 xiaoshancun 添加到wireshark组中。 使之成为新的组员。
root@xiaoshancun-VM500:~# chgrp wireshark /usr/bin/dumpcap
# 将/usr/bin/dumpcap 程序的属组更改为wireshark 。
root@xiaoshancun-VM500:~# chmod 4750 /usr/bin/dumpcap
修改 /usr/bin/dumpcap 的权限 更改为 4750 添加suid 权限 。
root@xiaoshancun-VM500:~# setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap

修改完成还不能直接使用,需要重新登陆一下才可以。需你不想重新登陆可以使用如下命令。
root@xiaoshancun-VM500:~# newgrp wireshark
完屔后就可以使用普通用户执行wireshark 程序了。

原文地址:http://blog.163.com/likaifeng@126/blog/static/32097310201271451655190/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐