Expire Root Password And Check SSH Access Fails
Change-Id: I37a2ebb8ddf51b566481f568a0d1981ad60cf73e
Signed-off-by: Anves Kumar rayankula <anvesr77@in.ibm.com>
diff --git a/security/test_bmc_expire_password.robot b/security/test_bmc_expire_password.robot
index 347663a..1bd261b 100644
--- a/security/test_bmc_expire_password.robot
+++ b/security/test_bmc_expire_password.robot
@@ -26,6 +26,20 @@
${status}= Run Keyword And Return Status Run External IPMI Standard Command lan print -v
Should Be Equal ${status} ${False}
+
+Expire Root Password And Check SSH Access Fails
+ [Documentation] Expire root user password and expect an error while access via SSH.
+ [Tags] Expire_Root_Password_And_Check_SSH_Access_Fails
+
+ Open Connection And Log In ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}
+ ${output} ${stderr} ${rc}= BMC Execute Command passwd --expire ${OPENBMC_USERNAME}
+ Should Contain ${output} password expiry information changed
+
+ ${status}= Run Keyword And Return Status
+ ... Open Connection And Log In ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}
+ Should Be Equal ${status} ${False}
+
+
Expire And Change Root User Password And Access Via SSH
[Documentation] Expire and change root user password and access via SSH.
[Tags] Expire_Root_User_Password_And_Access_Via_SSH
@@ -116,7 +130,6 @@
Valid Length OPENBMC_PASSWORD min_length=8
Redfish.Logout
-
Restore Default Password For Root User
[Documentation] Restore default password for root user (i.e. 0penBmc).
@@ -152,4 +165,3 @@
${resp}= Post Request openbmc /login data=${data} headers=${headers}
${json}= To JSON ${resp.content}
Should Contain ${json["extendedMessage"]} POST the new password
-