From 323d8aa537745b241a6bde87ca883d2eeeb33fe3 Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Wed, 18 Jul 2012 11:37:38 -0600 Subject: [PATCH] Fix #1482 --- salt/modules/useradd.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/salt/modules/useradd.py b/salt/modules/useradd.py index 36e8d3bd99..096b311cd1 100644 --- a/salt/modules/useradd.py +++ b/salt/modules/useradd.py @@ -58,7 +58,10 @@ def add(name, cmd += '-G {0} '.format(','.join(groups)) if home: if home is not True: - cmd += '-d {0} '.format(home) + if system: + cmd += '-d {0} '.format(home) + else: + cmd += '-m -d {0} '.format(home) else: if not system: cmd += '-m '