ipmitool

Install
sudo apt install -y freeipmi-tools ipmitool

Install ipmitool (IPMI command line client)
wget https://raw.githubusercontent.com/panticz/installit/master/install.ipmitool.sh -O - | bash -

#!/bin/bash

sudo apt-get install -y ipmitool

# enable modules for local ipmi access
cat <<EOF>> /etc/modules
ipmi_devintf
ipmi_msghandler
ipmi_poweroff
ipmi_si
ipmi_watchdog
EOF

Configure BMC to DHCP
# show BMC interface informations
ipmitool lan print

# set dhcp IP
ipmitool lan set 1 ipsrc dhcp

# set static IP
ipmitool lan set 1 ipsrc static
ipmitool lan set 1 ipaddr 10.0.1.11
ipmitool lan set 1 netmask_address 255.255.255.0
ipmitool lan set 1 defgw ipaddr 10.0.1.252

Commands
# Reset chassis intrusion
ipmitool -I lanplus -H ${BMC_IP} -U ${BMC_USER} -P ${BMC_PASS} raw 0x30 0x03

# enable UID light
ipmitool -H ${BMC_IP} -U ${BMC_USER} -P ${BMC_PASS} raw 0x30 0x0d

# disable UID light
ipmitool -H ${BMC_IP} -U ${BMC_USER} -P ${BMC_PASS} raw 0x30 0x0e

configure bmc user
NEW_BMC_USER=devops
NEW_BMC_PASS=pass1234
ipmitool -H ${BMC_IP} -U ${BMC_USER} -P ${BMC_PASS} user set name 2 ${NEW_BMC_USER}
ipmitool -H ${BMC_IP} -U ${NEW_BMC_USER} -P ${BMC_PASS} user set password 2 ${NEW_BMC_PASS}

view sensors readings
ipmitool sdr

# howto
# reset BMC
ipmitool -I lan -H ${BMC_HOST} -U ${BMC_USER} -P ${BMC_PASS} mc reset cold

# reset factory defaults
ipmitool -I lan -H ${BMC_HOST} -U ${BMC_USER} -P ${BMC_PASS} raw 0x3c 0x40

# reset server
ipmitool power reset -I lan -H ${IP} -U ADMIN -P ADMIN

# power on / off
ipmitool -I lanplus -H SERVER_IP -U ADMIN -P ADMIN power on
ipmitool -I lanplus -H SERVER_IP -U ADMIN -P ADMIN power off
ipmitool -I lanplus -H ${BMC_IP} -U ${BMC_USER} -P ${BMC_PASS} power reset

# get IPMI IP
IPMI_IP=$(ipmitool lan print | grep "IP Address" | grep -v Source | cut -d":" -f2)

FRU
ipmitool -I lanplus -H ${BMC_HOST} -U ${BMC_USER} -P ${BMC_PASS} fru

Configure User
https://docs.oracle.com/en/database/oracle/oracle-database/18/cwlin/example-of-bmc-configuration-using-ipmitool.html#GUID-11E563E0-3688-4FE9-8440-81402A7AC23A
https://www.thomas-krenn.com/de/wiki/IPMI_Konfiguration_unter_Linux_mittels_ipmitool
https://www.thomas-krenn.com/de/wiki/IPMI_Konfiguration_unter_Linux_mittels_ipmitool

# test
ipmitool -I lanplus -H 192.168.1.100 -U ADMIN -P ADMIN sdr
ipmitool -I lan -H 192.168.1.100 -U ADMIN -P ADMIN sdr

Boot into
ipmitool -I lanplus -H 10.0.0.101 -U ADMIN chassis bootdev bios