From ed813fe6f0716906c8b9cd09c27e3acfb8b21e43 Mon Sep 17 00:00:00 2001 From: Sudhir Menon Date: Wed, 14 Aug 2024 13:05:53 +0530 Subject: [PATCH] ipatests: Replace 'usermod -r' command with 'gpasswd -d' in test_hsm.py Test 'test_hsm_negative_bad_token_dir_permissions' was failing in RHEL because of the below error. "ipa: ERROR: stderr: usermod: invalid option -- 'r'" Hence replaced the usermod with gpasswd command which does the same and works on both RHEL and Fedora. Ref: https://pagure.io/freeipa/issue/9626 Signed-off-by: Sudhir Menon Reviewed-By: Florence Blanc-Renaud --- ipatests/test_integration/test_hsm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipatests/test_integration/test_hsm.py b/ipatests/test_integration/test_hsm.py index 7f92c6a79..374f5c25f 100644 --- a/ipatests/test_integration/test_hsm.py +++ b/ipatests/test_integration/test_hsm.py @@ -898,7 +898,7 @@ class TestHSMNegative(IntegrationTest): '--label', token_name] ) self.master.run_command( - ['usermod', 'pkiuser', '-r', '-G', 'ods'] + ['gpasswd', '-d', 'pkiuser', 'ods'] ) result = tasks.install_master( self.master, raiseonerr=False,