Install sysusers.d config for 'tcpdump' user/group #1384
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).