-
Notifications
You must be signed in to change notification settings - Fork 252
Expand system test framework: passwd #1357
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
Draft
ikerexxe
wants to merge
36
commits into
shadow-maint:master
Choose a base branch
from
ikerexxe:test-passwd
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Temporary workaround to create the newusers PAM service file. Fedora will soon provide this service file and we'll be able to remove the workaround. Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
This is the transformation to Python of the test located in `tests/newusers/35_read_from_stdin/newusers.test`, which checks that `newusers` is able to create new users from stdin. Signed-off-by: Iker Pedrosa <[email protected]>
… input This is the transformation to Python of the test located in `tests/newusers/20_multiple_users/newusers.test`, which checks that `newusers` is able to create new users from file. Signed-off-by: Iker Pedrosa <[email protected]>
Temporary workaround to create the groupmems PAM service file. Fedora will soon provide this service file and we'll be able to remove the workaround. Signed-off-by: Iker Pedrosa <[email protected]>
…ems` Signed-off-by: Iker Pedrosa <[email protected]>
This is the transformation to Python of the test located in `tests/grouptools/groupmems/01_groupmems_root_add_user/groupmems.test`, which checks that `groupmems` is able to add a user to a group running as the root user. Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Change to a new group using `newgrp`. Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
|
This PR depends on #1340 as it contains several changes that are included there too. |
Signed-off-by: Iker Pedrosa <[email protected]>
Expose shadow's password regex pattern in a function. Signed-off-by: Iker Pedrosa <[email protected]>
… stdin Signed-off-by: Iker Pedrosa <[email protected]>
…teractive mode This is the transformation to Python of the test located in `tests/passwd/18_passwd_root_change_password_user/passwd.test`, which checks that `passwd` is able to change a user's password running as root in interactive mode. Signed-off-by: Iker Pedrosa <[email protected]>
…teractive mode This is the transformation to Python of the test located in `tests/passwd/19_passwd_user_change_password/passwd.test`, which checks that `passwd` is able to change a user's password running as the user in interactive mode. Signed-off-by: Iker Pedrosa <[email protected]>
Temporary workaround to create the chpasswd PAM service file. Fedora will soon provide this service file and we'll be able to remove the workaround. Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
…nteractive This is the transformation to Python of the test located in `tests/usertools/chpasswd/02_chpasswd_multiple_users/chpasswd.test`, which checks that `chpasswd` is able to change the password of multiple users in batch. Signed-off-by: Iker Pedrosa <[email protected]>
…rom file Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Define administrators and members as list. Signed-off-by: Iker Pedrosa <[email protected]>
…oot user This is the transformation to Python of the test located in `tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/gpasswd.test`, which checks that `gpasswd` is able to add a user to a group membership running as root. Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
This is the transformation to Python of the test located in `tests/grouptools/gpasswd/50_gpasswd_change_admin_list/gpasswd.test`, which checks that `gpasswd` is able to add a user as a group administrator. Signed-off-by: Iker Pedrosa <[email protected]>
…on-root user Signed-off-by: Iker Pedrosa <[email protected]>
Fix chgpasswd to properly handle input files that don't end with a newline, similar to how chpasswd handles this case. Previously, chgpasswd would incorrectly report "line too long" errors when processing the last line of a file that didn't end with a newline character. The fix adds proper end-of-file detection and long line handling logic consistent with chpasswd implementation. Signed-off-by: Iker Pedrosa <[email protected]>
…swd` Signed-off-by: Iker Pedrosa <[email protected]>
… interactive This is the transformation to Python of the test located in `tests/grouptools/chgpasswd/02_chgpasswd_multiple_groups/chgpasswd.test`, which checks that `chgpasswd` is able to change the password of multiple groups in batch. Signed-off-by: Iker Pedrosa <[email protected]>
… from file Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Signed-off-by: Iker Pedrosa <[email protected]>
Temporary workaround to create the /etc/gshadow in OpenSUSE. Link: <https://forums.opensuse.org/t/no-etc-gshadow-gpasswd-puts-password-hash-into-world-readable-etc-group/179019> Signed-off-by: Iker Pedrosa <[email protected]>
* Run vipw on passwd file and add a user * Run vipw on shadow file and add a user * Run vipw on group file and add a group * Run vipw on gshadow file and add a group Signed-off-by: Iker Pedrosa <[email protected]>
ccd5e41 to
6ebe538
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Expand the system test framework to provide python bindings for
passwd,chpasswd,gpasswd,chgpasswdandvipwbinaries. Also include at least one test case example for each of them. Additional changes has been made to the way we generate the test environment (a.k.a. containers) so that it contains everything needed to run these tests.