Skip to content

Instantly share code, notes, and snippets.

@mpkopec
mpkopec / noroot_tcpdump.sh
Created April 4, 2022 10:00
Enable tcpdump for non-root users on Debian/Ubuntu.
#!/usr/bin/env bash
# NOTE: This will let anyone who belongs to the 'pcap' group
# execute 'tcpdump'
# NOTE2: User running the script MUST be a sudoer. It is
# convenient to be able to sudo without a password.
sudo groupadd pcap
sudo usermod -a -G pcap $USER