also forgot, it's important not to forget the spiritual successor to the client side of nis which is sssd. i think it might be a redhat or canonical thing. either way, if you are insisting on doing live network queries for passwd entries, you generally want it, as it will cache in the event that the network goes down.
one of the reasons to prefer flat files is if getpwnam and friends start to hang or return inconsistent results, the system will become unresponsive or misbehave in all sorts of amusing ways.
> ye old faithful which i always preferred for production systems which was to rsync flatfiles out for maximum reliability.
This is the best way. The key is making sure that somewhere you're managing user ids, cause cleaning up after assigning the same uid to different users on different systems gets icky.
not sure if i totally agree with the immutability argument for /etc, but i suppose that's more about protecting against errant devs abusing sudo privs to do weird things rather than securing things against malicious actors.