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:


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 ?

  • What are you actually running in Terminal to get that error? Might be worth adding, right now the question looks kind of incomplete?
    – nohillside
    Dec 2, 2018 at 15:23

1 Answer 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>


<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.

  • It's always advisable to reduce the work done in an admin/root shell to a minimum. Luckily one can read the current policies without having to be root.
    – nohillside
    Dec 2, 2018 at 15:05
  • 1
    It works for me ! thanks a lot! First: remove the one line, Two: alter march rules!
    – Love
    Dec 23, 2018 at 1:35
  • 1
    I am getting now after some years Error: The data is not in the correct format. so looks like it doesn't work anymore
    – Renetik
    May 23, 2021 at 18:28

Not the answer you're looking for? Browse other questions tagged .