Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
systemsmanagement:saltstack:products:testing
py26-compat-salt
fix-usermod-options-for-sle11-bsc-1117017-114.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-usermod-options-for-sle11-bsc-1117017-114.patch of Package py26-compat-salt
From 608aa5c728f8437f3c0903cb26142bb4db489582 Mon Sep 17 00:00:00 2001 From: Bo Maryniuk <bo@maryniuk.net> Date: Mon, 29 Apr 2019 17:29:02 +0200 Subject: [PATCH] Fix usermod options for SLE11 (bsc#1117017) (#114) * Fix usermod options for SLE11 (bsc#1117017) * Fixes grain comparison __grains__['osmajorrelease'] returns a string instead of a number. --- salt/modules/useradd.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/salt/modules/useradd.py b/salt/modules/useradd.py index c723bb9bd3..dadd59462d 100644 --- a/salt/modules/useradd.py +++ b/salt/modules/useradd.py @@ -414,8 +414,14 @@ def chgroups(name, groups, append=False, root=None): if __grains__['kernel'] != 'OpenBSD': if append and __grains__['kernel'] != 'AIX': - cmd.append('-a') - cmd.append('-G') + if __grains__['osfullname'] == 'SLES' and __grains__['osmajorrelease'] == '11': + # SLE11 doesn't support "-a" and "-G" together with the for usermod + # See https://bugzilla.suse.com/show_bug.cgi?id=1117017 + cmd.append('-A') + else: + cmd.append('-a') + if '-A' not in cmd: + cmd.append('-G') else: if append: cmd.append('-G') -- 2.20.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor