Skip to content

Instantly share code, notes, and snippets.

@cachedout
Created October 15, 2013 22:24
Show Gist options
  • Save cachedout/6999628 to your computer and use it in GitHub Desktop.
Save cachedout/6999628 to your computer and use it in GitHub Desktop.
Index: salt/states/user.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- salt/states/user.py (revision e013d26cac0e87bcbcb87c55a792a8480ae7045a)
+++ salt/states/user.py (revision )
@@ -258,7 +258,7 @@
log.warning('Group "{0}" specified in both groups and '
'optional_groups for user {1}'.format(isected, name))
- if gid_from_name:
+ if gid_from_name or (not gid and __salt__['pw_group.info'](name)):
gid = __salt__['file.group_to_gid'](name)
changes = _changes(name,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment