Update passwd --expire command return message
Openbmc now update shadow with version 4.11, and the passwd --expire
return message is changed. Add new return message support and use
${uername} instead of hard code change admin_user password.
Signed-off-by: Brian Ma <chma0@nuvoton.com>
Change-Id: I6bd3c24a70c105aa122a27b0f531cf0365b08bde
diff --git a/lib/bmc_redfish_utils.robot b/lib/bmc_redfish_utils.robot
index 4b5af5b..680bb52 100644
--- a/lib/bmc_redfish_utils.robot
+++ b/lib/bmc_redfish_utils.robot
@@ -277,13 +277,14 @@
# Expire admin password using ssh.
Open Connection And Log In ${username} ${password}
${output} ${stderr} ${rc}= BMC Execute Command passwd --expire ${username}
- Should Contain ${output} password expiry information changed
+ Should Contain Any ${output} password expiry information changed
+ ... password changed
# Verify user password expired using Redfish
Verify User Password Expired Using Redfish ${username} ${password}
# Change user password.
- Redfish.Patch /redfish/v1/AccountService/Accounts/admin_user
+ Redfish.Patch /redfish/v1/AccountService/Accounts/${username}
... body={'Password': '${new_password}'}
Redfish.Logout