Home · Latest · Trends  /  HP / ILO
0

HP iLO - Disable IPMI over lan via command line (cli)

rated 0 times [  0] [ 0]  / comments: 0 / hits: 42  / 1 month ago, mon, nov 12, 2018, 14:06:32
You can use this script (after changing 'USER_LOGIN' and 'PASSWORD') to disable IMPI over lan. It will install hponcfg (centos/rhel) if not installed already, then set IMPI over LAN disabled.
#!/bin/bash
 
# Check for root user
if [[ $USER == 'root' ]]; then

# Install hponcfg
yum -y install hponcfg
 
echo "Disabling IPMI over LAN..."
 
# Create the xml file that we'll import (change USER_LOGIN and PASSWORD values!)
cat <<END >/root/disable_ipmi.xml
<RIBCL VERSION="2.0">
<LOGIN USER_LOGIN="adminname" PASSWORD="password">
<RIB_INFO MODE="write">
<MOD_GLOBAL_SETTINGS>
<IPMI_DCMI_OVER_LAN_ENABLED VALUE="No"/>
</MOD_GLOBAL_SETTINGS>
</RIB_INFO>
</LOGIN>
</RIBCL>
END
 
# Import our new setting
hponcfg -f /root/disable_ipmi.xml

# Remove this file since it has password info
rm -f /root/disable_ipmi.xml

else
        echo "You must be root"
fi

#  Remove this script since it has password info
rm -f -- "$0"
More From » HP / ILO
 

Comments

There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account
 
Share
Sponsor
Posted
rob

rob

Member since Feb 22, 2017
Total Code Snippets: 118
Total Comments: 1
Location: n/a
Following
User not following anyone yet.
rob snippets
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017
2 yaers ago, wed, feb 22, 2017