Cisco
Recover a lost enable password on Cisco ISR and ASR routers using the config-register 0x2142 procedure over the console port.
This guide provides step-by-step instructions for resetting lost or forgotten administrative passwords on enterprise networking hardware. Follow the procedure below carefully to regain access while preserving your device configuration.
Before proceeding with password recovery, ensure you have a console cable, terminal emulation software configured to 9600 baud, and physical access to the device.
Connect your terminal cable to the console port of the device and open your serial terminal session.
Power cycle the hardware and issue a Break key sequence during initial system startup to enter ROMMON mode.
Bypass startup configuration loading, boot into system software, set your new credentials, and save changes back to non-volatile memory.
ISR and ASR platforms use the standard Cisco IOS/IOS-XE password-recovery procedure: interrupt the boot before IOS finishes loading, boot with the configuration register set so the router ignores its startup configuration, set a new password, then restore the original configuration.
no service password-recovery is configured, stop. Recovery is disabled on that router and the next break erases the configuration.rommon 1 > prompt. The break sequences are defined in detail below.rommon 1 > confreg 0x2142rommon 2 > resetRouter> enableRouter# copy startup-config running-configRouter(config)# enable secret <new-password>Router(config)# config-register 0x2102Router(config)# endRouter# write memoryRouter# reloadThe break has to land after POST completes and just before IOS/IOS-XE finishes loading, not at power-on. For the ISR G2 (1900/2900/3900), ISR 1000, ISR 4000 (4321 to 4461) and ASR 1000 families, Cisco documents that you must send the break repeatedly through the boot window until the boot aborts. One well-timed press is often not enough.
Ctrl+Break, or the window menu → Special Command → Break. This is the exact path Cisco documents. On a keyboard with no Break key, the menu is the only way to send it.Fn+Break.Ctrl+Break.Ctrl+Break, or the Send Break button on the toolbar).Ctrl+], type send break, then Enter. Note that a terminal server on the console port is not a supported path for this procedure and may not pass the break at all; a direct console cable is recommended.Ctrl+Break, then Special Command → Break.Current image running: Boot ROM1 Last reset cause: LocalSoft ISR4331/K9 platform with 4194304 Kbytes of main memory ........ Located isr4300-universalk9.16.12.04.SPA.bin ############################################## Failed to boot file bootflash:isr4300-universalk9.16.12.04.SPA.bin ....... rommon 1 >
At the rommon 1 > prompt continue with step 3 above.
On IOS-XE platforms that load packages.conf, use boot flash:packages.conf at the rommon prompt if a plain reset does not boot the router.