Installing Wireshark on Ubuntu 12.04 LTS

来源:互联网 发布:php 解析html标签 编辑:程序博客网 时间:2024/05/16 18:20

Installing Wireshark on Ubuntu 12.04 LTS

Installing wireshark on Ubuntu 12.04 LTD and limiting packet capture to one group, in this case the group wireshark. I’m sure you can use these instructions for other debian based distributions.

Although you’ll have to take it as read that I’ve only tested it on Ubuntu, feel free to let me know if it doesn’t and I’ll amend the instructions to suit.

First, we install Wireshark from the terminal.

Installing Wireshark

1
sudoapt-get installwireshark

No interface can be used for capturing in this system with the current configuration

If you run wireshark as a non root user at this stage (see image above), 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.

Create the wireshark group.

1
sudogroupadd wireshark

Add your username to the wireshark group

1
sudo usermod-a -G wireshark YOUR_USER_NAME

Change the group  ownership of file dumpcap to wireshark

1
sudochgrp wireshark /usr/bin/dumpcap

Change the mode of the file dumpcap to allow execution by the group wireshark

1
sudochmod 750 /usr/bin/dumpcap

Grant capabilities with setcap

1
sudosetcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap

Verify the change

1
sudogetcap /usr/bin/dumpcap

At this point, you will need to log out, then back into Unity (Thanks for Jorge for pointing this out).

You should now be able to run Wireshark as a non-root user, just as long as that user is part on the wireshark group, everything should just work.

References:

原创粉丝点击