This question already has an answer here:

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 ?

marked as duplicate by nohillside macos Dec 18 '18 at 5:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 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 '18 at 15:23

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 '18 at 15:05
  • It works for me ! thanks a lot! First: remove the one line, Two: alter march rules! – Love Dec 23 '18 at 1:35

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