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 <sumenon@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
This commit is contained in:
Sudhir Menon authored and Florence Blanc-Renaud committed 2024-08-16 08:55:45 +02:00
1 parent 15de71ae61
commit 58c1fdd416
1 file changed
+1 -1
+1 -1
View File
@@ -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,