您的位置:首页 > 其它

How to reset password for cisco router and switch

2013-04-10 16:52 621 查看
Router:

1. Console port connect to PC COM port.

2. Open the ScecureCTR or other software , e.g. Putty.

3. When loading IOS image ,use Ctrl+C[/i] to interrupt the progress to got ROMMON model

(this model is like the grub prompt interface of linux)

rommon>

4. confreg 0x2142[/i], This command tell router don’t load startup-config next time

restart 。

5.Restart the router manually,or use reload [/i]to restart.

6 Execute the following command when the router on(after IOS image loaded and the

setup process show.enter no[/i] to terminate the process.)

enable [/i]enter the privileged EXEC mode

copy start run[/i] copy the startup-config to running-config

conf t[/i]enter the configuration mode

ena sec **** [/i]enable secret set as ****,change the password.

config-register 0x2102[/i]restore the register value,the value maybe

different,so you better got the value before change to 0x2142 use show version[/i]

end [/i]or Ctrl+C [/i]exit from the configuration mode

copy run start[/i]or wr[/i] save all the config to NVRAM.

Boot [/i]or Reload [/i] boot the IOS or reboot the router.it seems that we

don’t need to restart the router.

Switch:

1. Connect the switch RJ-45 console port and the PC’s COM port.

2. launch the remote connect software, e.g. SecureCRT,Putty.

3.Power on the switch device,and press the mode button until the port status LEDs are down.enter the ROMMON model.

flash_init init the flash file system.

load _helper

dir flash:change the work directory to flash: and display the files.

rename flash:config.txt flash:config.back rename the configure file name to let the switch can’t find

the file”config.txt”.

boot boot the IOS image and the operation system will can’t

find the configure file. the setup dialog will process.

NO enter NO to ignore the dialog

enable enter the privileged EXEC mode

rename flash:config.back flash:config.text restore the file name of the config.txt

copy flash:config.text system:running-configcopy the startup-config to running-config,

conf t enter the configuration mode[/b]

ena sec **** reset enable password

end exit from the configuration mode

copy run startsave the running-config to flash.(not

NVRAM,it’s different from router)

reload reboot the system,but maybe this step is

not necessary

In ALL.the purpose of all the methods used is to ignore/skip the configuration file.because the password is stored in the configuration file.
本文出自 “奋斗的菜鸟” 博客,谢绝转载!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: