How to use hponcfg tool in Linux to reset ILO password ?

Today in this post, we will look how to use HPONCFG tool to reset ILO password from the installed Linux OS.

1. First Step is to get existing ILO configuration

### write exiting configuration to random-ilo4.xml file.
bash-4.2# hponcfg -w random-ilo4.xml
HP Lights-Out Online Configuration utility
Version 4.6.2 Date 02/20/2017 (c) 2004,2017 Hewlett Packard Enterprise Development LP.
Firmware Revision = 2.55 Device type = iLO 4 Driver name = hpilo
Management Processor configuration is successfully written to file "random-ilo4.xml"
bash-4.2# 

### View the existing configuration
bash-4.2# cat r059-ilo4.xml


< RIBCL VERSION="2.1">
 < LOGIN USER_LOGIN="Administrator" PASSWORD="password">
  < DIR_INFO MODE="write">
  < MOD_DIR_CONFIG>
    < DIR_AUTHENTICATION_ENABLED VALUE = "N"/>
    < DIR_LOCAL_USER_ACCT VALUE = "Y"/>
    < DIR_SERVER_ADDRESS VALUE = ""/>
    < DIR_SERVER_PORT VALUE = "636"/>
    < DIR_OBJECT_DN VALUE = ""/>
    < DIR_OBJECT_PASSWORD VALUE = ""/>
    < DIR_USER_CONTEXT_1 VALUE = ""/>
    < DIR_USER_CONTEXT_2 VALUE = ""/>
    < DIR_USER_CONTEXT_3 VALUE = ""/>
  </ MOD_DIR_CONFIG>
  </ DIR_INFO>
  < RIB_INFO MODE="write">
  < MOD_NETWORK_SETTINGS>
    < SPEED_AUTOSELECT VALUE = "Y"/>
    < NIC_SPEED VALUE = "10"/>
    < FULL_DUPLEX VALUE = "N"/>
    < IP_ADDRESS VALUE = "10.17.32.76"/>
    < SUBNET_MASK VALUE = "255.255.255.0"/>
    < GATEWAY_IP_ADDRESS VALUE = "10.17.32.1"/>
    < DNS_NAME VALUE = "random-ilo4"/>
    < PRIM_DNS_SERVER value = ""/>
    < DHCP_ENABLE VALUE = "N"/>
    < DOMAIN_NAME VALUE = "example.com"/>
    < DHCP_GATEWAY VALUE = "N"/>
    < DHCP_DNS_SERVER VALUE = "N"/>
    < DHCP_STATIC_ROUTE VALUE = "N"/>
    < DHCP_WINS_SERVER VALUE = "N"/>
    < REG_WINS_SERVER VALUE = "N"/>
    < PRIM_WINS_SERVER value = "0.0.0.0"/>
    < STATIC_ROUTE_1 DEST = "0.0.0.0" GATEWAY = "0.0.0.0"/>
    < STATIC_ROUTE_2 DEST = "0.0.0.0" GATEWAY = "0.0.0.0"/>
    < STATIC_ROUTE_3 DEST = "0.0.0.0" GATEWAY = "0.0.0.0"/>
  </ MOD_NETWORK_SETTINGS>
  </ RIB_INFO>
  < USER_INFO MODE="write">
  < ADD_USER USER_NAME = "test1" USER_LOGIN = "test1" PASSWORD = "%user_password%">
    < ADMIN_PRIV value = "N"/>
    < REMOTE_CONS_PRIV value = "Y"/>
    < RESET_SERVER_PRIV value = "N"/>
    < VIRTUAL_MEDIA_PRIV value = "N"/>
    < CONFIG_ILO_PRIV value = "N"/>
  </ ADD_USER>
  < ADD_USER USER_NAME = "test2" USER_LOGIN = "test2" PASSWORD = "%user_password%">
    < ADMIN_PRIV value = "N"/>
    < REMOTE_CONS_PRIV value = "Y"/>
    < RESET_SERVER_PRIV value = "Y"/>
    < VIRTUAL_MEDIA_PRIV value = "N"/>
    < CONFIG_ILO_PRIV value = "N"/>
  </ ADD_USER>
  < ADD_USER USER_NAME = "halo" USER_LOGIN = "halo" PASSWORD = "%user_password%">
    < ADMIN_PRIV value = "N"/>
    < REMOTE_CONS_PRIV value = "N"/>
    < RESET_SERVER_PRIV value = "N"/>
    < VIRTUAL_MEDIA_PRIV value = "N"/>
    < CONFIG_ILO_PRIV value = "N"/>
  </ ADD_USER>
  < ADD_USER USER_NAME = "health" USER_LOGIN = "health" PASSWORD = "%user_password%">
    < ADMIN_PRIV value = "N"/>
    < REMOTE_CONS_PRIV value = "N"/>
    < RESET_SERVER_PRIV value = "N"/>
    < VIRTUAL_MEDIA_PRIV value = "N"/>
    < CONFIG_ILO_PRIV value = "N"/>
  </ ADD_USER>
  < ADD_USER USER_NAME = "test3" USER_LOGIN = "test3" PASSWORD = "%user_password%">
    < ADMIN_PRIV value = "Y"/>
    < REMOTE_CONS_PRIV value = "Y"/>
    < RESET_SERVER_PRIV value = "Y"/>
    < VIRTUAL_MEDIA_PRIV value = "Y"/>
    < CONFIG_ILO_PRIV value = "Y"/>
  </ ADD_USER>
  </ USER_INFO>
 </ LOGIN>
</ RIBCL>
bash-4.2# 

2. Create a new RIBCL Configuraton file to modify the ILO settings.

### Create a new text file say static
[root@nglinux ~]#$ ls -ltr
total 8
-rw-r--r-- 1 root     root     2947 Jul 17 20:32 random-ilo3.xml
-rw-r----- 1 root aplstaff  356 Jul 17 20:44 static
[root@nglinux ~]#

### Remove extra space after < , its added to avoid taking html as its tag and to display it properly :)
[root@nglinux ~]# cat static 
< RIBCL VERSION="2.0">
< LOGIN USER_LOGIN="user" PASSWORD="password1">
< RIB_INFO MODE="WRITE" >
< MOD_NETWORK_SETTINGS>
< IP_ADDRESS VALUE = "10.16.144.12"/>
< SUBNET_MASK VALUE = "255.255.255.0"/>
< GATEWAY_IP_ADDRESS VALUE = "10.16.144.1"/>
< PRIM_DNS_SERVER value = "17.128.100.12"/> 
< /MOD_NETWORK_SETTINGS>
< RESET_RIB/>
< /RIB_INFO>
< /LOGIN>
< /RIBCL>
[root@nglinux ~]#

3. Execute the created Script to modify ILO Network Settings.

bash-4.2# hponcfg -f static 
HP Lights-Out Online Configuration utility
Version 4.6.2 Date 02/20/2017 (c) 2004,2017 Hewlett Packard Enterprise Development LP.
Firmware Revision = 2.55 Device type = iLO 4 Driver name = hpilo
< INFORM> DHCP is currently disabled, enable DHCP to use any DHCP setting.
< INFORM>Integrated Lights-Out will reset at the end of the script.

Please wait while the firmware is reset. This might take a minute    
Script succeeded 
bash-4.2# 
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments