Password recovery on a Cisco 1941 router
Prereqs
- a PC (BIOS/UEFI) running Linux Mint 21
- minicom terminal emulation software
- a serial console cable
- a Cisco 1941 router
- a working IOS, but inaccessible (forgotten console and/or enable password)
Setup
Situation
The "console password" and "enable password" (Privileged EXEC mode) are - amongst other router configuration settings - stored in startup-config (NVRAM). Recovery of a lost password is only useful if you have a inacessible (but working) IOS. If not, you have a bigger problem and have to (re)install an IOS operating system first.
No access to the console.
ROMMON
Boot the router in ROMMON-mode using the break sequence mechanism. To my knowledge, there is no "password recovery mechanism" like on a Cisco 2960 switch.
The configuration register is typically set to 0x2102. Let's change it to 0x2142. This will bypass the startup-configuration file.
Reload the router.
You are greeted with the initial configuration dialog. Answer "no" and press Enter. Go to privileged exec mode.
Optional: if you do not want to keep the startup-configuration, delete it now. Else, skip this step.
Optional: if you do want to keep the startup-configuration, copy it to memory. Else, skip this step.
Configure the new privileged exec mode and console passwords. Change the configuration register back to 0x2102. Save the running-configuration and reload.