抓包工具wireshark添加用户权限

本文详细介绍了如何在Ubuntu上安装Wireshark并进行必要的配置步骤,包括创建Wireshark组、更改文件权限和设置网络能力等,以便非root用户能够顺利运行Wireshark进行网络捕获。

Installation of Wireshark:
$ sudo apt-get install wireshark


If you run wireshark as a non root user at this stage, you will get
the message “No interface can be used for capturing in this system with the current configuration.”. 
The following steps will rectify this.


1) Create the wireshark group.
$ sudo groupadd wireshark


2) Add your username to the wireshark group
$ sudo usermod -a -G wireshark YOUR_USER_NAME


3) Change the group ownership of file dumpcap to wireshark
$ sudo chgrp wireshark /usr/bin/dumpcap


4) Change the mode of the file dumpcap to allow execution by the group wireshark
$ sudo chmod 750 /usr/bin/dumpcap


5) Grant capabilities with setcap, man capabilities(7), setcap(8), cap_from_text(3) for more info about what are "cap_net_raw", "cap_net_admin" and "eip". Anyway, after we grant the capabilities, the dump can perform various network-related operations, use RAW and PACKET sockets; bind to any address for transparent proxying.
$ sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap


6) Verify the change
$ sudo getcap /usr/bin/dumpcap
Output should be like below:
$ /usr/bin/dumpcap = cap_net_admin,cap_net_raw+eip


7) At this point, you will need to log out, then back into ubuntu

转载于:https://my.oschina.net/u/2245781/blog/793328

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值