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

(Backport 50175) Add root parameter to useradd, shadow and groupadd #54955

merged 8 commits into from Dec 4, 2019


Copy link

@aplanas aplanas commented Oct 11, 2019

What does this PR do?

Add root parameter to useradd and shadow execution modules

Tests written?


(backport #50175, already merged in develop)

@waynew waynew added this to PR needs merge to master in PRs to port to master Oct 17, 2019
@dwoz dwoz requested a review from as a code owner Nov 20, 2019
@ghost ghost requested a review from waynew Nov 20, 2019
aplanas added 8 commits Dec 3, 2019
Use the root parameter in the rest of the public API.

Refactor the code to remove duplicate code.

(cherry picked from commit d0d9b86)
Refactor the code to avoid duplications, and use the alternative
spwd functions when a different root is set.

(cherry picked from commit 09d9da9)
In Python 3 the fields for name and password for the spwd module
are different that in Python 2.

This patch makes sure to explore first the Python 2 name and later
check the Python 3 if is not found.

(cherry picked from commit 21e59fb)
In some places of the code gpasswd and usermod are used depending
on the plataform.  One use -Q and other use -R to indicate a
different root parameter.

This patch unify this, using --root parameter.

Partially fix saltstack#43131

(cherry picked from commit 27372ee)
@dwoz dwoz merged commit fc7ddb8 into saltstack:master Dec 4, 2019
49 checks passed
PRs to port to master automation moved this from PR needs merge to master to PR merged Dec 4, 2019
Copy link
Collaborator Author

@aplanas aplanas commented Dec 4, 2019

Uau, this is huge. Thanks a lot!

@aplanas aplanas deleted the backport_50175 branch Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Successfully merging this pull request may close these issues.

None yet

4 participants