@@ -113,16 +113,14 @@ def test_ldap__authenticate_user_with_whitespace_prefix_in_userid(client: Client
113
113
@pytest .mark .ticket (bz = 1507035 )
114
114
@pytest .mark .topology (KnownTopology .LDAP )
115
115
@pytest .mark .parametrize ("method" , ["su" , "ssh" ])
116
- def test_ldap__change_password_when_ldap_pwd_policy_is_set_to_shadow (client : Client , ldap : LDAP , method : str ):
116
+ def test_ldap__shadow_policy_change_password (client : Client , ldap : LDAP , method : str ):
117
117
"""
118
118
:title: Change password with shadow ldap password policy is set to shadow
119
119
:description: Changing a password when the password policy is managed by the shadowAccount objectclass.
120
120
:setup:
121
- 1. Configure the LDAP ACI to permit user password changes
122
- 2. Create user with shadowLastChange = 0, shadowMin = 0, shadowMax = 99999 and shadowWarning = 7
123
- 3. Set "ldap_pwd_policy = shadow"
124
- 4. Set "ldap_chpass_update_last_change = True"
125
- 5. Start SSSD
121
+ 1. Create user with shadowLastChange = 0, shadowMin = 0, shadowMax = 99999 and shadowWarning = 7
122
+ 2. Set "ldap_pwd_policy = shadow" and "ldap_chpass_update_last_change = True"
123
+ 4. Start SSSD
126
124
:steps:
127
125
1. Authenticate as "tuser" with old password
128
126
2. Authenticate as "tuser" with new password
@@ -131,7 +129,6 @@ def test_ldap__change_password_when_ldap_pwd_policy_is_set_to_shadow(client: Cli
131
129
2. Authentication with new password was successful
132
130
:customerscenario: True
133
131
"""
134
- ldap .aci .add ('(targetattr="userpassword")(version 3.0; acl "pwp test"; allow (all) userdn="ldap:///self";)' )
135
132
ldap .user ("tuser" ).add (
136
133
uid = 999011 , gid = 999011 , shadowMin = 0 , shadowMax = 99999 , shadowWarning = 7 , shadowLastChange = 0 , password = "Secret123"
137
134
)
@@ -342,10 +339,9 @@ def test_ldap__lookup_and_authenticate_as_user_with_different_object_search_base
342
339
"modify_mode, expected, err_msg" ,
343
340
[("exop" , 1 , "Expected login failure" ), ("exop_force" , 3 , "Expected password change request" )],
344
341
)
345
- @pytest .mark .parametrize ("method" , ["su" , "ssh" ])
346
342
@pytest .mark .topology (KnownTopology .LDAP )
347
343
def test_ldap__password_change_no_grace_logins_left (
348
- client : Client , ldap : LDAP , modify_mode : str , expected : int , err_msg : str , method : str
344
+ client : Client , ldap : LDAP , modify_mode : str , expected : int , err_msg : str
349
345
):
350
346
"""
351
347
:title: Password change when no grace logins left
@@ -382,7 +378,7 @@ def test_ldap__password_change_no_grace_logins_left(
382
378
client .sssd .domain ["ldap_pwmodify_mode" ] = modify_mode
383
379
client .sssd .start ()
384
380
385
- rc , _ , _ , _ = client .auth .parametrize ( method ) .password_with_output ("user1" , "Secret123" )
381
+ rc , _ , _ , _ = client .auth .ssh .password_with_output ("user1" , "Secret123" )
386
382
assert rc == expected , err_msg
387
383
388
384
0 commit comments