tcpdump icon indicating copy to clipboard operation
tcpdump copied to clipboard

Install sysusers.d config for 'tcpdump' user/group

Open bluca opened this issue 1 month ago • 3 comments

Ubuntu, Fedora and other distro create the tcpdump user/group pair by default, to be used for unprivileged access to tcpdump:

https://git.launchpad.net/ubuntu/+source/tcpdump/tree/debian/tcpdump.postinst https://src.fedoraproject.org/rpms/tcpdump/blob/rawhide/f/tcpdump-sysusers.conf

Add a sysusers.d config file and install it. This configuration file will create the 'tcpdump' user/group pair on first boot/factory reset/package installation, without requiring manual scripts or actions. This is very important for image-based OSes, but it is useful in other cases too, to allow using declarative configuration instead of scripts.

RPM now has built-in support for sysusers.d too.

https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html

This is just a one-line config file, so if a system doesn't support sysusers.d, it is a harmless no-op (and can be deleted/not packaged too).

bluca avatar Nov 11 '25 00:11 bluca