summaryrefslogtreecommitdiffstats
path: root/init/configure_ipmi.sh
blob: b0dc0faeaf1629ab3022b59f2c048648590103e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function configure_ipmi_user {
    host="$1"
    pass="$2"
    echo "Configuring: $host"
    /usr/bin/ipmitool -I lanplus -H "$host" -U ADMIN -P "$pass" user set name 3 nagios
    /usr/bin/ipmitool -I lanplus -H "$host" -U ADMIN -P "$pass" user set password 3 _iosnag_
    /usr/bin/ipmitool -I lanplus -H "$host" -U ADMIN -P "$pass" user priv 3 4
    /usr/bin/ipmitool -I lanplus -H "$host" -U ADMIN -P "$pass" user enable 3 
    /usr/bin/ipmitool -I lanplus -H "$host" -U ADMIN -P "$pass" user list 1
}

#for host in 192.168.26.{152,155,156}; do
#    configure_ipmi_user "$host" 'ipepdv'
#done

for host in 192.168.26.160; do
    configure_ipmi_user "$host" '$ipepdv$'
done