Finding the user password expiration date
On a linux system you can see (and change) the user password expiry information with the command chage. That command is not available on macOS. It seems the replacement is pwpolicy, but I can't get it to work. I've tried various ways like pwpolicy -getglobalpolicy or pwpolicy -u username -getaccountpolicies but nothing is returning useful information. I have tried it with and without sudo.