Skip to content

Instantly share code, notes, and snippets.

@staaldraad staaldraad/setWireshark
Last active Aug 29, 2015

What would you like to do?
Run wireshark without having to be root
if [ "$1" != "" ]; then
echo "ERROR: no username supplied"
echo "Using current user"
### Ubuntu:
# apt-get install libcap2-bin
sudo groupadd wireshark
sudo usermod -a -G wireshark $USERNAME
echo "Setting perms on dumpcap, change /usr/bin to /usr/sbin if needed"
sudo chgrp wireshark /usr/bin/dumpcap
sudo chmod 754 /usr/bin/dumpcap
sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap
echo "Checking if cap has been set:"
sudo getcap /usr/bin/dumpcap
echo "Ensuring user has been added to wireshark group"
sudo -u $USERNAME newgrp wireshark
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.