How can I make my Mac accept a user password of less then 4 characters? I don't want secure password for my desktop. Instead I use just two letters for quick typing. I can change password in terminal by running:

passwd


But terminal gives me:   Failed global policy "com.apple.defaultpasswordpolicy"  Password change failed because password does not meet minimum quality requirements

I believe if the password has less than 4 characters this is blocked.
The same limitation is when trying to set it by preference panel obviously.

Until now in last versions of system, only solution I found was installing of Server application from Apple and basically modifying you osx by it to be   a server, so you can access one setting for password characters policy and be able to set whatever password you like. 
So is there other option ?
I found this not so easy solution on web, that works quickly instead of necessity to do it by Server application from apple.

In Terminal:

pwpolicy getaccountpolicies &gt; temp.xml
nano temp.xml


Now remove text prior to first &lt;xml tag and replace

&lt;string&gt;policyAttributePassword matches '^$|.{4,}+'&lt;/string&gt;


to

&lt;string&gt;policyAttributePassword matches '^$|.{1,}+'&lt;/string&gt;


then save file (Ctrl-O), exit (Ctrl-X) and run

sudo pwpolicy setaccountpolicies temp.xml


to install the updated policy.