交换机忘记登录密码,如何跳过登录密码,进入交换机查看历史配置。
(0)
console密码也忘了吗?
连接console就行
console密码忘记可以清除,但是本机的logbuf日志就没了:
通过conlse线和crt软件连接并登陆设备,然后把设备断电重启。控制台上会打印如下信息,当出现“press Ctrl+B”的时候快速按住“Ctrl+B” 进入botroom菜单
System is starting...
Press Ctrl+D to access BASIC-BOOTWARE MENU
Booting Normal Extend BootWare
The Extend BootWare is self-decompressing.......................Done!
BootWare Validating...
Press Ctrl+B to enter extended boot menu...
BotWare password: Not required. Please press Enter to continue.
Password recovery capability is enabled.
Note: The current operating device is flash
Enter < Storage Device Operation > to select device.
按住“Ctrl+B”进入如下菜单。选择“<6> Skip Current System Configuration”跳过当前配置启动,不同设备可能不是数字6,
===========================<EXTEND-BOOTWARE MENU>===========================
|<1> Boot System |
|<2> Enter Serial SubMenu |
|<3> Enter Ethernet SubMenu |
|<4> File Control |
|<5> Restore to Factory Default Configuration |
|<6> Skip Current System Configuration |
|<7> BootWare Operation Menu |
|<8> Clear Super Password |
|<9> Storage Device Operation |
|<0> Reboot |
============================================================================
Ctrl+Z: Access EXTEND-ASSISTANT MENU
Ctrl+F: Format File System
Enter your choice(0-9): 6
Flag Set Success.
然后输入0重启设备
===========================<EXTEND-BOOTWARE MENU>===========================
|<1> Boot System |
|<2> Enter Serial SubMenu |
|<3> Enter Ethernet SubMenu |
|<4> File Control |
|<5> Restore to Factory Default Configuration |
|<6> Skip Current System Configuration |
|<7> BootWare Operation Menu |
|<8> Clear Super Password |
|<9> Storage Device Operation |
|<0> Reboot |
============================================================================
Ctrl+Z: Access EXTEND-ASSISTANT MENU
Ctrl+F: Format File System
Enter your choice(0-9): 0
System is starting...
Press ENTER to get started.
操作步骤:跳过启动文件后直接保存当前配置,再重启。
<H3C>save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):(输入回车)
flash:/startup.cfg exists, overwrite? [Y/N]:y
Validating file. Please wait...
Configuration is saved to device successfully.
<H3C>reboot
Start to check configuration with next startup configuration file, please wait.........DONE!
Current configuration may be lost after the reboot, save current configuration? [Y/N]:y
This command will reboot the device. Continue? [Y/N]:y
<H3C>
#Apr 26 12:02:07:166 2000 H3C SHELL/4/LOGIN:
Trap 1.3.6.1.4.1.25506.2.2.1.1.3.0.1<hh3cLogIn>: login from Console
%Apr 26 12:02:07:306 2000 H3C SHELL/5/SHELL_LOGIN: Console logged in from aux0.
<H3C>dir %查看设备配置文件
Directory of flash:/
1 drw- - Apr 26 2000 12:00:20 logfile
2 -rw- 1666 Apr 26 2000 12:05:39 startup.cfg
3 -rw- 1556 Apr 26 2000 12:05:33 _startup_bak.cfg
4 -rw- 151 Apr 26 2000 12:05:30 system.xml
29106 KB total (16876 KB free)
给设备和电脑配置成同网段IP地址(举例:WAC配置成192.168.100.1,电脑配置成192.168.100.2),在电脑上通过3CD软件搭建tftp服务器。
<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]interface Vlan-interface 1
[H3C-Vlan-interface1]ip address 192.168.100.1 24
[H3C-Vlan-interface1]quit
[H3C]ping 192.168.100.2
PING 192.168.100.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.100.2: bytes=56 Sequence=1 ttl=128 time=7 ms
Reply from 192.168.100.2: bytes=56 Sequence=2 ttl=128 time=2 ms
<H3C>tftp 192.168.100.2 put startup.cfg
File will be transferred in binary mode
Sending file to remote TFTP server. Please wait... |
TFTP: 1666 bytes sent in 0 second(s).
File uploaded successfully.
<H3C>
下载成功:
可以到本地相关路径(此例子中是E盘)查看到相关文件。
需要恢复之前配置
解决方法:删除密码恢复之前配置文件
使用记事本打开startup.cfg文件
删除aux0口下的认证方式和密码并保存文件
覆盖当前配置文件
<H3C>tftp 192.168.100.20 get startup.cfg
The file startup.cfg exists. Overwrite it? [Y/N]:y
Verifying server file...
Deleting the old file, please wait...
...
File will be transferred in binary mode
Downloading file from remote TFTP server, please wait....
TFTP: 1166 bytes received in 0 second(s)
File downloaded successfully.
<H3C>reboot
Start to check configuration with next startup configuration file, please wait.........DONE!
Current configuration may be lost after the reboot, save current configuration? [Y/N]:n 不保存配置
This command will reboot the device. Continue? [Y/N]:y 确定继续重启
(1)
您好,参考
选择BootROM菜单选项<6> Skip Current System Configuration
下面就是BootROM的菜单项,选择6,回车
注:<6>选项进入系统后,是跳过当前配置,所以里面是空配置,但原配置还在系统中
==========================<EXTENDED-BOOTWARE MENU>==========================
|<1> Boot System #启动应用程序,也就是直接进入系统
|<2> Enter Serial SubMenu #进入串口子菜单,用来更改串口速率和上传文件
|<3> Enter Ethernet SubMenu #进入以太网子菜单,一般用网线上传文件从这里设置
|<4> File Control #进入文件控制器子菜单,是对文件的一些基本操作:查看、删除等
|<5> Restore to Factory Default Configuration #恢复出厂设置
|<6> Skip Current System Configuration #跳过当前系统配置,不启动你之前的配置,属于空配置
|<7> BootWare Operation Menu #进入BootRWare操作子菜单
|<8> Skip Authentication for Console Login #跳过Console口登录认证,也就是跳过console密码
|<9> Storage Device Operation #进入存储介质操作子菜单
|<0> Reboot #重启设备
============================================================================
Ctrl+Z: Access EXTENDED ASSISTANT MENU
Ctrl+F: Format File System
Enter your choice(0-9):
6
2回车后会再次回到这个界面,选择1,回车进入系统
==========================<EXTENDED-BOOTWARE MENU>==========================
|<1> Boot System |
|<2> Enter Serial SubMenu |
|<3> Enter Ethernet SubMenu |
|<4> File Control |
|<5> Restore to Factory Default Configuration |
|<6> Skip Current System Configuration |
|<7> BootWare Operation Menu |
|<8> Skip Authentication for Console Login |
|<9> Storage Device Operation |
|<0> Reboot |
============================================================================
Ctrl+Z: Access EXTENDED ASSISTANT MENU
Ctrl+F: Format File System
Enter your choice(0-9):1
3进入系统后,无需输入console密码,直接进入到用户视图
<H3C>dir #查看系统文件
Directory of flash:
0 drw- - Sep 16 2020 10:13:44 diagfile
1 -rw- 1554 Sep 16 2020 11:13:01 ifindex.dat
2 -rw- 21632 Sep 16 2020 10:13:44 licbackup
3 drw- - Sep 16 2020 10:13:44 license
4 -rw- 21632 Sep 16 2020 10:13:44 licnormal
5 drw- - Sep 16 2020 10:13:44 logfile
6 -rw- 0 Sep 16 2020 10:13:43 s5820v2_5830v2-cmw710-boot-a7514.bin
7 -rw- 0 Sep 16 2020 10:13:43 s5820v2_5830v2-cmw710-system-a7514.bin
8 drw- - Sep 16 2020 10:13:44 seclog
9 -rw- 6382 Sep 16 2020 11:13:01 startup.cfg
10 -rw- 111206 Sep 16 2020 11:13:01 startup.mdb
1046512 KB total (1046304 KB free)
注:配置文件默认名称为 startup.cfg,配置文件都是 .cfg结尾
4查看配置文件
<H3C>more startup.cfg #查看startup.cfg文件
#
version 7.1.075, Alpha 7571
#
sysname H3C
#
irf mac-address persistent timer
irf auto-update enable
undo irf link-delay
irf member 1 priority 1
#
lldp global enable
#
一下空格敲到底,将配置文件拷贝出来
找到 line con 0
将里面的set authentication password hash 以及后面的一堆数字字母符号的东西删掉,替换成 set authentication password simple 123456 #意思就是将密码设置成123456
5将刚才拷贝出来并改好密码的配置,复制粘贴再刷到配置中
最重要的一步
save force 保存配置
(1)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论