How can I make my Mac accept a user password of less then 4 characters? [duplicate]

Solution 1:

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 > temp.xml
nano temp.xml

Now remove text prior to first <xml tag and replace

<string>policyAttributePassword matches '^$|.{4,}+'</string>

to

<string>policyAttributePassword matches '^$|.{1,}+'</string>

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

sudo pwpolicy setaccountpolicies temp.xml

to install the updated policy.