Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for groupadd execution module failures in SLES11 systems #33712

Conversation

meaksh
Copy link
Contributor

@meaksh meaksh commented Jun 2, 2016

What does this PR do?

This PR fixes a bug in group execution module when we're using SLES11 SPX and also openSUSE 11.X systems.

gpasswd version for SLES11 SPX and openSUSE 11.X does not support the arguments passed by Salt when calling adduser, deluser or members functions of group execution module.

This PR uses usermod and groupmod instead of gpasswd to manage the groups when using these systems.

Previous Behavior

clisles11sp3-suma3pg:~ # salt-call group.adduser www root
[INFO    ] Executing command 'gpasswd --add root www' in directory '/root'
[ERROR   ] Command 'gpasswd --add root www' failed with return code: 6
[ERROR   ] output: gpasswd: unrecognized option '--add'
Try `gpasswd --help' or `gpasswd --usage' for more information.
local:
    False

New Behavior

clisles11sp3-suma3pg:~ # salt-call group.adduser www root
[INFO    ] Executing command 'usermod -A www root' in directory '/root'
local:
    True

Tests written?

No

Thanks!

/cc @isbm @kkaempf

@cachedout
Copy link
Contributor

Any comments here @isbm ?

@cachedout cachedout added the Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged label Jun 2, 2016
@isbm
Copy link
Contributor

isbm commented Jun 3, 2016

@meaksh Unit tests? 😉

@meaksh
Copy link
Contributor Author

meaksh commented Jun 3, 2016

Added changes for unit tests. Now we cover some special cases for different OS 😄

@cachedout cachedout merged commit 11e39e7 into saltstack:2015.8 Jun 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pending-Discussion The issue or pull request needs more discussion before it can be closed or merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants