diff --git a/Kerberos/test_kerberos_ssh_login.py b/Kerberos/test_kerberos_ssh_login.py index bd575c4..e93abf7 100644 --- a/Kerberos/test_kerberos_ssh_login.py +++ b/Kerberos/test_kerberos_ssh_login.py @@ -4,6 +4,7 @@ import pytest from SCAutolib.models.authselect import Authselect +from SCAutolib.isDistro import isDistro def test_krb_user_ssh(ipa_user, user_shell): @@ -65,7 +66,10 @@ def test_krb_change_passwd_ssh(ipa_user, user_shell, ipa_login): user_shell.sendline(f"whoami") user_shell.expect_exact(ipa_user.username) user_shell.sendline(f"passwd") - user_shell.expect_exact(f"Changing password for user {ipa_user.username}.") + if isDistro(['rhel', 'centos'], '>=10') or isDistro('fedora', '>=40'): + user_shell.expect_exact(f"Current password") + else: + user_shell.expect_exact(f"Changing password for user {ipa_user.username}.") # Login with kerberos user using a smart card and then check if we can still ssh into the system diff --git a/Kerberos/test_kerberos_user_change_password.py b/Kerberos/test_kerberos_user_change_password.py index f6da4c4..db6ae6c 100644 --- a/Kerberos/test_kerberos_user_change_password.py +++ b/Kerberos/test_kerberos_user_change_password.py @@ -2,6 +2,7 @@ import conftest from SCAutolib.models.authselect import Authselect +from SCAutolib.isDistro import isDistro @pytest.mark.parametrize("required,insert,expect,secret", @@ -66,4 +67,7 @@ def test_kerberos_change_passwd(ipa_user, user_shell, required, insert, expect, user_shell.sendline(cmd) user_shell.expect_exact(expect) user_shell.sendline(secret) - user_shell.expect_exact(f"Changing password for user {ipa_user.username}.") + if isDistro(['rhel', 'centos'], '>=10') or isDistro('fedora', '>=40'): + user_shell.expect_exact(f"Current password") + else: + user_shell.expect_exact(f"Changing password for user {ipa_user.username}.")