How to permanently add a user to a system group
I've created a fail2ban user to allow modifications to the firewall rules. I need to add the user to the "proxy" group so that it can run pfctl, but that modification to /etc/group gets lost on reboot. How can I make this change permanent?
At the moment there isn't a way to add a user to a reserved system group in a way that will be preserved.
You could script a groupmod command into a shellcmd so it would happen at bootup
/usr/sbin/pw groupmod proxy -m <username>That might get you closer, though it could still be clobbered if the groups get rewritten later</username>