Deste post .
The
passwdcommand rejects the idea that you can have a 0 length password.Instead use
dsclwhich is more accepting of the notion that the password is nothing.
dscl . -passwd /Users/fooYou can press enter to make the new password blank and then may get an error and have to enter the old password if you are not root but once you authenticate (or are root already) the blank password will be written.