BMC忘记密码怎么办 - ipmitool 配置IP地址,账户,密码

apt-get install -y ipmitool
或者: yum install -y ipmitool
BMC配置命令
ipmitool lan print 1 #打印当前ipmi 地址配置信息。
ipmitool lan set 1 ipsrc static  # 设置 id 1 为静态IP地址。
ipmitool lan set 1 ipaddr 10.42.223.71  # 设置 IPMI 地址。
ipmitool lan set 1 netmask 255.255.255.0 # 设置 IPMI 子网掩码。
ipmitool lan set 1 defgw ipaddr 10.42.223.254 # 设置 IPMI 网关。
Ipmitool user list 1  # 显示 IPMI 用户列表。
ipmitool user set name 2 root #创建用户,一般服务器有默认的超级用户(root,admin,ADMIN),
可以直接修改超级用户的密码,不用重新创建。


ipmitool user set password 2 calvin #创建密码
ipmitool channel setaccess 1 2 callin=on ipi=on link=on privilege=4 #开权限 
ipmitool user list 1 # 查看chanenel1的用户信息
Ipmitool user set password 1 abc-123 # 修改用户 id1 的密码 为 abc-123. #abc-123就是要设置的密码
#!/bin/bash
IP=`cat /etc/netplan/00-installer-config.yaml  | grep 10.60 | sort -u | grep address | grep -o -E "[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}"`
ip1=`echo $IP | cut -d. -f1`
ip2=`echo $IP | cut -d. -f2`
ip3=`echo $IP | cut -d. -f3`
ip4=`echo $IP | cut -d. -f4`
ipmitool lan set 1 ipsrc static
ipmitool lan set 1 ipaddr 10.62.$ip3.$ip4
ipmitool lan set 1 netmask 255.255.255.0
ipmitool lan set 1 defgw ipaddr 10.62.$ip3.254
ipmitool mc reset cold
ipmitool user set name 4 admin1    
ipmitool user set password 4  admin1
ipmitool channel setaccess  1 4 callin=on ipmi=on link=on  privilege=4
ipmitool user enable 4
ipmitool lan print 1
ipmitool channel getaccess 1 4
ipmitool user list 1
posted @   从雍和宫走到电影学院  阅读(586)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· NetPad:一个.NET开源、跨平台的C#编辑器
· PowerShell开发游戏 · 打蜜蜂
· 凌晨三点救火实录:Java内存泄漏的七个神坑,你至少踩过三个!
点击右上角即可分享
微信分享提示