diff --git a/provision/useringroup.go b/provision/useringroup.go index 327a1d0..0605cb8 100644 --- a/provision/useringroup.go +++ b/provision/useringroup.go @@ -21,7 +21,7 @@ func addUserToGroup(user, group string) error { internal.Log.Infof("Adding user %s to group %s", user, group) usermod := fmt.Sprintf("usermod -aG %s %s", group, user) - _, err = marecmd.RunFormatError(marecmd.Input{Command: usermod, Sudo: isRoot}) + _, err = marecmd.RunFormatError(marecmd.Input{Command: usermod, Sudo: !isRoot}) if err != nil { return err }