oob bios config password and bios reset
Tested:
1. Bios reset flag can be modified throw redfish
POST https://IP_ADDR/redfish/v1/Systems/system/Bios/Actions/Bios.ResetBios
{
"ResetFlag": "Factory"
}
root@intel-obmc:~# busctl call xyz.openbmc_project.BIOSConfigManager /xyz/openbmc_project/bios_config/manager org.freedesktop.DBus.Properties Get ss xyz.openbmc_project.BIOSConfig.Manager ResetBIOSSettings
v s "xyz.openbmc_project.BIOSConfig.Manager.ResetFlag.FactoryDefaults"
2. Bios change password:
root@intel-obmc:~# cat /var/lib/bios-settings-manager/seedData
{
"UserPwdHash": "08D91157785366CDC3AA64D87E5E3C621EDAB13E26B6E484397EBA5E459E54C567BF5B1FFB36A43B6142B18F8D642E9D",
"AdminPwdHash": "08D91157785366CDC3AA64D87E5E3C621EDAB13E26B6E484397EBA5E459E54C567BF5B1FFB36A43B6142B18F8D642E9D",
"Seed": "123456",
"HashAlgo": "SHA384"
}
POST https://IP_ADDR/redfish/v1/Systems/system/Bios/Actions/Bios.ChangePassword
{
"NewPassword": "12345678",
"OldPassword": "1234567890",
"PasswordName": "Administrator"
}
root@intel-obmc:~# cat /var/lib/bios-settings-manager/passwordData
{
"CurrentPassword": "1234567890",
"IsAdminPwdChanged": 1,
"IsUserPwdChanged": 0,
"NewPassword": "2DD65D57EB60B1D92C5F3D2DC84724FCEE7BC02E57AA75E834712266ED94CAC704047B2FF7CEC1C36BED280B36BB5AC6",
"UserName": "Administrator"
}
Change-Id: Ib54b36819e49c891c6169c95d9cdaebd5bcb06f3
Signed-off-by: Kuiying Wang <kuiying.wang@intel.com>
diff --git a/service_files/xyz.openbmc_project.biosconfig_password.service b/service_files/xyz.openbmc_project.biosconfig_password.service
new file mode 100644
index 0000000..8b4ef9d
--- /dev/null
+++ b/service_files/xyz.openbmc_project.biosconfig_password.service
@@ -0,0 +1,12 @@
+[Unit]
+Description= BIOS Config Password - For Remote BIOS configuration update
+
+[Service]
+Restart=always
+ExecStart=/usr/bin/biosconfig-password
+SyslogIdentifier=biosconfig-password
+Type=dbus
+BusName=xyz.openbmc_project.BIOSConfigPassword
+
+[Install]
+WantedBy=multi-user.target