diff --git a/es24n_conf.py b/es24n_conf.py index 1320c90..92be53c 100644 --- a/es24n_conf.py +++ b/es24n_conf.py @@ -396,7 +396,8 @@ def _redfish_request(password: str, method: str, path: str, Returns (success: bool, data: dict|str). """ url = f"https://{host}{path}" - credentials = b64encode(f"Admin:{password}".encode()).decode() + username = "root" if host == "127.0.0.1" else "Admin" + credentials = b64encode(f"{username}:{password}".encode()).decode() ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE @@ -452,7 +453,7 @@ def _redfish_upload_firmware(password: str, host: str, fw_path: str) -> tuple: ).encode() + file_data + f"\r\n--{boundary}--\r\n".encode() url = f"https://{host}/redfish/v1/UpdateService" - credentials = b64encode(f"Admin:{password}".encode()).decode() + credentials = b64encode(f"Admin:{password}".encode()).decode() # always network ctx = ssl.create_default_context() ctx.check_hostname = False ctx.verify_mode = ssl.CERT_NONE