在cisco路由器开机60秒内按下ctrl+break健 进入特权模式
rommon 1>confreg 0x2142 //修改寄存器的值为0x2142 ,使路由器路过nvram配置文件执行,从而不检查原先设置的密码
rommon 2> i //按下i 健重启路由器
重启路由器后进入setup模式 ,按下ctrl+C健退出setup模式
router>enable
router#>copy startup-config running-config //将原来路由器的配置文件调出,
router#>config terminal
router(config)#enable password yourpassword //修改密码,替换原先的密码
routerr(config)#config-register 0x2102 //恢复寄存口碑 值为0x2102 ,目地是下次重
启路由器时执行nvram中的配置文件
router(config)#exit
router#copy running-config startup-config //将配置文件写入到nvram中
router#reload