saltstack/salt — comment on commit dfc994b8fd4cd1f88ff6425196c51447c572c677
File: salt/states/ssh_auth.py line 71
By SEJeff:

Actually in looking at the reason Corey mentioned this bug at all, the problem was that adding a user didn't create a home directory. The default of `useradd.add``` is to set home=False. If home=False, no the -m flag to useradd isn't added, if home is a string, it will do -m directory. I think that is ultimately what needs to be fixed.

Ultimately, I rescind my previous comment in that you and seth are both right. Upon looking at the problem more, the issue is that adding a user doesn't _by default_ create their home directory unless you explicitly define it. The default is set in /etc/default/useradd in any distro that uses the passwd package (every distro), and that should be honored unless explicitly set to be somewhere else.

On IRC, @whiteinge brought up the good point. In that use case, what is the best way to have a way to not create a homedir. Also, it is non-backwards compatible.