Zend certified PHP/Magento developer

Is it okay to remove unknown accounts from /etc/passwd?

Accounts like lp, bin, daemon, ftp, etc. look like legacy accounts that I won’t need on my servers but are installed by default.

Is there an easy way to detect which accounts are required? I see things like “daemon” which I don’t want to break all daemons, but I don’t know how this account is used. The same for “sync”, “operator”, and many others.

I’m looking for some means other than just removing the account, rebooting, and seeing if anything looks broken.

Editing to add, DISA (DoD) requires it: https://www.stigviewer.com/stig/red_hat_enterprise_linux_8/2021-12-03/finding/V-230379