diff --git a/salt/states/user.py b/salt/states/user.py index a55a5860ce..8562387c14 100644 --- a/salt/states/user.py +++ b/salt/states/user.py @@ -66,7 +66,8 @@ def _changes( if lusr['uid'] != uid: change['uid'] = uid if gid: - if lusr['gid'] != gid: + if lusr['gid'] not in (gid, + __salt__['file.group_to_gid'](gid)): change['gid'] = gid # remove the default group from the list for # comparison purposes