Method for Resetting Password on Cisco Router
Application Scenario
Due to prolonged non-login or technician replacement, the console password of a Cisco router may be forgotten or lost and cannot be recovered. This document will guide you on how to reset the password for a Cisco router. Using the Cisco 1921 router as an example, this guide will help resolve this issue.
Preparations
Before performing the reset, ensure the following preparations are completed:
Prepare a console cable to connect the router's console port to the computer's serial port.
Open terminal software on the computer (such as SecureCRT). As shown in the GUI interface below, set the connection type to serial, baud rate to 9600, no parity, no flow control, and 1 stop bit.
Recovery Steps
Enter ROM Mode
Plug in the router's power and start it. When the message "CISCO1921/K9 platform with 524288 Kbytes of main memory" appears, quickly press [Ctrl+Break] to interrupt the boot process and enter ROM monitor mode (ROMMON). The prompt will display as "rommon 1 >".
In ROMMON Mode
Enter the command "confreg 0x2142" and press Enter. This changes the configuration register value to 0x2142, causing the router to skip reading the configuration file from NVRAM during startup and bypass password authentication.
Then, enter "reset" to restart the device.
Load Configuration
After the above operations, the device will start with default settings.
In User EXEC mode, enter the "enable" command to enter Privileged EXEC mode.
In this mode, use the command "copy startup-config running-config" to load the forgotten configuration settings into the current active configuration.
Modify Passwords
In Privileged EXEC mode, enter "configure terminal" to enter Global Configuration mode.
In this mode, you can modify the console login password and enable password.
Restore Register Value
After modifying the passwords, enter the command "config-register 0x2102" in Global Configuration mode to restore the register value to the normal setting of 0x2102.
Exit to the user interface, save the configuration, and restart the device.
Verify New Password
After startup, the password will be the newly modified one.