
François Donzé - Technical consultant, HPE
March 2018Updated March 2024, November 2025
You receive a bunch of brand new rack-mount ProLiant servers and want to get them up and running as soon as possible. Ansible, Chef, Puppet, Ironic, Python, PowerShell are your friends but, before being able to use those powerful and flexible tools to fully deploy the servers, you need one little thing: An access to the iLO to configure low level system parameters (i.e. iLO network, BIOS, storage…).
This blog post proposes a simple, quick and modern method to modify the factory randomly generated Administrator iLO password without knowing it. It can be used on one or several of rack-mount ProLiant servers based on HPE iLO 4, 5 or 6. This problem does not exist for blades or Synergy compute modules because their embedded management modules (respectively OA and Composer) have the ability to perform those tasks without any credentials.
Gen12 servers based on iLO 7 and later, cannot use this method because the required Production security mode does not exists anymore.
HPE rack-mount servers, unless they have been customized by the HPE Factory Express integration service comes with a randomly generated factory password visible on a physical paper/plastic tag located somewhere on the front side of the servers. To speed-up the collection of the passwords it is possible to scan and export them in a .csv formatted file, using a smartphone bar-code application. However, this method has its limits when it comes to processing several hundreds or thousands of servers.
Instead, you can use an in-band management access method with the HPE iLOrest tool. This RESTful Interface tool can talk to iLO 4 and later, either from remote (out-of-band) or from the Operating System (Linux or Windows) running on the server itself (In-band management).
The method presented below only works when the iLO security state is Production (iLO 5 and 6). In higher security states, it is required to supply credentials. Use the following command to retrieve the SecurityState property of an iLO:
ilorest get SecurityState --select HpeSecurityService. --url <ilo-ip> --user <ilo-user> --password password --logout
To set the iLO Administrator password, when logged into the OS as a privileged user (root or Administrator), you just need to create a text file (i.e. MyPassword.txt) with the following content:
{
"path": "/redfish/v1/AccountService/Accounts/1/",
"body": {
"Password": "MyPassword"
}
}Then, using the HPE iLOrest tool, connect to the iLO via the Channel Interface (CHIF). Again, when logged as a privileged user, when the iLO is in Production security state, you don't need to supply any credential, and you can send the password request modification:

Figure 1: Changing the iLO factory generated Administrator password with iLOrest
But are you sure you changed the Administrator password and not another password account? What if the Administrator account is not located at position “1” in this collection of object?
HPE iLOrest can help you isolate the exact location of the Administrator account. The following command returns in JSON format what you need:

Figure 2: Retrieve URI of iLO user account 1 with iLOrest
With a simple parsing of the output of this command, you can create an error prone script to change the desired password.
Should you need to perform more complex digging to retrieve objects from this data model, the HPE iLOrest user guide contains a lot of useful examples.
Using this in-band management feature you can easily foresee an entire solution starting with a PXE boot of the servers on a minimal WinPE or PE-Linux operating system containing the iLOrest tool and an automatic trigger of a script performing the iLO password change and other tasks if desired.
Don't forget to check back the references and material section to learn more about Redfish tips and tricks.