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

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 程序了。 
 
原文地址:https://www.cnblogs.com/duanguyuan/p/3449960.html