sudo pwpolicy -u <user> -getaccountpolicies
clear the pwpolicy with this command (edit the user):
sudo pwpolicy -u <user> -clearaccountpolicies
macOS Support Resources and Information
sudo pwpolicy -u <user> -getaccountpolicies
clear the pwpolicy with this command (edit the user):
sudo pwpolicy -u <user> -clearaccountpolicies
Note To Self: DON NOT USE APPLE DISK UTILITY, for anything other than formatting disks. Remember that time you spent ALL weekend attempting to restore and image when Apple restore image failed at the VERY LAST minute after 7 hours. Error apfs inverter failed to invert the volume
I found using Carbon Copy Cloner (CCC) 5.x works best in my testing, really frustrates me that Apple does not build a tool for this. Carbon Copy Cloner backup software can be found here https://bombich.com/
In my CCC backup workflows:
Grant CCC Full Disk Access under carbon copy cloner top menu
1) Select Source ( the mounted image that is not booted into ) in other words I have booted into another drive to get a good clean back up image.
2) Select Destination, ( remember to Choose New Disk Image, then select Read-only disk image from the pull down menu )