saltstack/salt — pull request #4077 by grischa (2013-03-13 04:30:15+00:00)
Title: Useradd stability improvements

Useradd and explicit group dependencies did not work under certain circumstances, as explained in https://github.com/saltstack/salt/issues/1406
I moved the group adding out of the first call of useradd and made it a modification of the user after useradd has been called.
I also test whether the system has usergroups enabled and set the default group in useradd to avoid errors.