H3C R4900 V3在操作系统中修改HDM登录密码

1.下载ipmitool:http://ipmitool.sourceforge.net/

2.确定gcc工具已经安装好

  which gcc

3.  在Linux系统(Red Hat Enterprise Linux Server release 7.5 (Maipo))上加载启用IPMI驱动:

insmod /lib/modules/3.10.0-862.el7.x86_64/kernel/drivers/char/ipmi/ipmi_msghandler.ko.xz
insmod /lib/modules/3.10.0-862.el7.x86_64/kernel/drivers/char/ipmi/ipmi_devintf.ko.xz
insmod /lib/modules/3.10.0-862.el7.x86_64/kernel/drivers/char/ipmi/ipmi_si.ko.xz 

4.  检查你的/dev目录下出现了ipmi0这个设备:

  ls -l /dev/ipmi0

5.  解压缩ipmitool-1.8.18.tar.bz2

  tar –jxv -f ipmitool-1.8.18.tar.bz2

  cd ipmitool-1.8.18

6.  开始安装ipmitool:

  ./configure

  make

  make install

7.  ipmitool命令将被安装到/usr/local/bin/ipmitool

8. 注意需要depmod保存当前驱动的依赖关系,防止重启后需要重新加载(service ipmi start)

9. ipmitool lan print可以查看当前HDM的地址
#查看目前登录地址对应的channel number,目前channel number 8 对应的IP地址是192.168.1.2,这个不是我们预设的HDM管理地址!
[root@sodweb01 ~]# ipmitool lan print 8
Set in Progress         : Set Complete
Auth Type Support       : MD5 
Auth Type Enable        : Callback : MD5 
                        : User     : MD5 
                        : Operator : MD5 
                        : Admin    : MD5 
                        : OEM      : MD5 
IP Address Source       : Static Address
IP Address              : 192.168.1.2
Subnet Mask             : 255.255.255.0
MAC Address             : 80:e4:55:9c:7e:63
SNMP Community String   : AMI
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control         : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl   : 0.0 seconds
Default Gateway IP      : 0.0.0.0
Default Gateway MAC     : 00:00:00:00:00:00
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3,6,7,8,11,12,15,16,17
Cipher Suite Priv Max   : caaaaaaaaaaaXXX


[root@sodweb01 ~]# ipmitool lan print 1
#目前channel number 1 对应的IP地址是10.216.94.101,这个是我们预设的HDM管理地址!
Set in Progress         : Set Complete
Auth Type Support       : MD5 
Auth Type Enable        : Callback : MD5 
                        : User     : MD5 
                        : Operator : MD5 
                        : Admin    : MD5 
                        : OEM      : MD5 
IP Address Source       : Static Address
IP Address              : 10.216.94.101
Subnet Mask             : 255.255.255.0
MAC Address             : 80:e4:55:9c:7e:64
SNMP Community String   : AMI
IP Header               : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10
BMC ARP Control         : ARP Responses Enabled, Gratuitous ARP Disabled
Gratituous ARP Intrvl   : 0.0 seconds
Default Gateway IP      : 10.216.94.1
Default Gateway MAC     : 54:2b:de:ac:02:01
Backup Gateway IP       : 0.0.0.0
Backup Gateway MAC      : 00:00:00:00:00:00
802.1q VLAN ID          : Disabled
802.1q VLAN Priority    : 0
RMCP+ Cipher Suites     : 0,1,2,3,6,7,8,11,12,15,16,17
Cipher Suite Priv Max   : caaaaaaaaaaaXXX
10. 设置新用户chenfuhai,此处9是指在HDM管理用户的编号是9(随意选的,数字不能大于16),系统默认1是匿名用户(anonymous),2是管理员用户(admin)
ipmitool user set name 9 chenfuhai
11. 设置用户密码
ipmitool user set password 9 Sodweb01?%
12. 启用用户,否则登录显示没有权限
ipmitool user enable 9
13. 设置用户为管理权限,最后的数字1是指 channel number,这个是必须的! 0x4 代表管理员权限
ipmitool user priv 9 0x4 1
14. 用新建账号登录到HDM去修改admin的密码即可

 

posted @ 2021-12-25 16:25  3哥哥  阅读(981)  评论(0编辑  收藏  举报