Search our Blogs
Showing results for 
Search instead for 
Do you mean 
 

Boosting your server deployment: How to change the factory generated iLO Administrator password

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 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 thousands of rack-mount ProLiant servers starting at Gen9 models. 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.

 

In-band management with hprest does the trick

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, I will use an in-band management access method with the hprest(8) tool. This RESTful Interface tool can talk to iLO 4 either from remote (out-of-band) or from the Operating System (Linux or Windows) running on the server itself (In-band management).

To set the iLO 4 Administrator password, when logged in to the OS as a privileged user (root or Administrator), I 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 hprest tool, I connect to the iLO via an internal path (no credential required here) and send the password request modification:

 

 

Send a rawpatch query with hprest

 

 

 

Data model clean crawling

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?

 

hprest can help you isolate the exact location of the Administrator account. The following command returns in JSON format what you need:

 

 

 Select and filter using hprest

 

 

 

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 Managing HP Servers Using the HP RESTful API manual explains very well with pseudo code examples how to crawl the data model without making bad assumptions.

 

Building the complete solution

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 hprest(8) tool and an automatic trigger of a script performing the iLO password change and other tasks if desired.

 

Comments
Level 4 Dan-Bryant Level 4
‎11-23-2016 09:54 AM - edited ‎11-30-2016 08:52 AM

Great Post.

 

For systems that haven't been installed yet, here's how to do it with the embedded UEFI shell:

Shell> restclient -type ManagerAccount -s "Password"="Pa55w0rd"
Success: Base.0.10.AccountModified
Shell> 
Social Media
† The opinions expressed above are the personal opinions of the authors, not of HPE. By using this site, you accept the Terms of Use and Rules of Participation