Can I create a user with empty/blank password in mac OS?

11,069

Solution 1

So after trying several ways on my own. I found a way to log in without a password using the following method:

  1. command - pwpolicy -setglobalpolicy minChars=0

This sets the password policy to include 0 character password.

  1. command - passwd <user> Then press enter without giving a password.

Now you can log in without a password but through GUI only. This doesn't work for SSH login.

Solution 2

You have to supply a password to crate a user, but if you then select the user and change the password, and leave the New Password and Verify Password fields blank, it will let you save it (with a warning about not having a password)

If you go to install a app or change a system-wide setting or anything else that normally prompts you for a password, you just hit return and it will act the same as typing in a valid password. When logging in, you should just have to click the user name and photo and it will log in.

You can’t use sudo on the terminal if your password is blank, it will always act like you’ve trumped the wrong password. Hopefully if you have a passwordless user, however, I hope to god you don’t want it for administrative uses anyway.

Edit: this is no longer possible for either administrative or standard users on macOS 10.14.2

Share:
11,069
Fullmetal
Author by

Fullmetal

Updated on September 18, 2022

Comments

  • Fullmetal
    Fullmetal over 1 year

    Is it possible to create a user without any password. Just enter username and login with empty/blank password in macOS any version.

  • Erfan
    Erfan over 4 years
    It seems like this isn't possible anymore. On Mojave 10.14.2 it now complains that the password is empty and it doesn't let you change it.
  • d-b
    d-b over 4 years
    Step 2 doesn't work anymore, it just leaves the password unchanged.
  • d-b
    d-b over 4 years
    In fact, step 1 didn't work either. I run pwpolicy -getaccountpolicies before I set minChars to 0 and then again afterwards. Before it was only one entry about the password length, afterwards, basically the whole file was duplicated and the Users & Group prefPane keeps crashing. Which file is it that pwpolicy is writing to?
  • FreelancerJ
    FreelancerJ over 4 years
    And I've just tested on Catalina 10.15.2 and it also has this requirement, for both administrator and standard users.
  • Aamir Afridi
    Aamir Afridi about 4 years
    I get passwd: authentication token failure
  • MichaelG
    MichaelG over 2 years
    It worked for me in Mojave 10.14.6