Wireshark software is a powerful packet capture tool, but its dumpcap component requires root privileges to operate. If run by a regular user, Wireshark will display an insufficient permissions prompt.
It is possible to forcefully use Wireshark through a command, but the latest version will display the following error message.
Lua: Error during loading: [string “/usr/share/wireshark/init.lua”]:44: dofile has been disabled due to running Wireshark as superuser. See https://wiki.wireshark.org/CaptureSetup/CapturePrivileges for help in running Wireshark as an unprivileged user.
Therefore, we can resolve Wireshark’s permissions issue by creating a user group that can use dumpcap with root privileges.
Steps to implement:
1. Add a Wireshark user group
2. Change the group of dumpcap to the Wireshark user group
3. Enable the Wireshark user group to use dumpcap with root privileges
4. Add the necessary regular username to the Wireshark user group. My username is “example” (this needs to be modified according to the specific username!), so the command to be used is: