Overview of the Password Recovery Procedure
Following is an overview of the steps in the password recovery procedure:
Step 1 If you can log in to the router, enter the show version command to determine the existing configuration register value.
Step 2 Press the Break key to get to the bootstrap program prompt (ROM monitor). You might need to reload the system image by power cycling the router.
Note To recover a lost password if the Break function is disabled on the router, you must have physical access to the router.
If you are going to power cycle a Cisco ASR 1013 Router, we recommend that you first perform a graceful reload on the router. Power cycling the router without first performing a graceful reload might cause a loss of data stored in the NVRAM. In other words, the configuration file might be lost. Note that this is not observed when a power failure occurs because each active power supply in the two power supply zones is power cycled at the same time during a power failure. If there is a chance that the router might be power cycled without a graceful reload, we recommend that you use the
command to specify a file system other than the NVRAM for storing the configuration file. The following are examples:
boot config harddisk:config_file.cfg nvbypass
boot config bootflash:configuration_data.cfg nvbypass
Step 3 Change the configuration register so the following functions are enabled:
b. Ignore startup configuration
c. Boot from flash memory
Note The key to recovering a lost password is to set the configuration register bit 6 (0x0040) so that the startup configuration (usually in NVRAM) is ignored. This allows you to log in without using a password and to display the startup configuration passwords.
Step 4 Power cycle the router by turning power off and then back on.
Note When powering off the router, wait for 30 seconds before powering it on again.
Step 5 Log in to the router and enter the privileged EXEC mode.
Step 6 Enter the show startup-config command to display the passwords.
Step 7 Recover or replace the displayed passwords.
Step 8 Change the configuration register back to its original setting.
Details of the Password Recovery Procedure
Perform the following steps to recover or replace a lost enable, enable secret, or console login password:
Step 1 Attach an ASCII terminal to the console port on your router.
Step 2 Configure the terminal to operate at 9600 baud, 8 data bits, no parity, and 1 stop bit (9600 8N1).
Step 3 If you can log in to the router as a nonprivileged user, enter the show version command to display the existing configuration register value. Note the value for use later and proceed to Step 6. If you cannot log in to the router at all, go to the next step.
Step 4 Press the Break key or send a Break from the console terminal. If Break is enabled, the router enters the ROM monitor, indicated by the ROM monitor prompt (rommon1>). Proceed to Step 6. If Break is disabled, power cycle the router (turn the router off or unplug the power cord, and then restore power after waiting 30 seconds). Then proceed to Step 5.
Step 5 Within 60 seconds of restoring the power to the router, press the Break key or send a Break. This action causes the router to enter the ROM monitor and display the ROM monitor prompt (rommon1>).
Step 6 Set the configuration register using the configuration register utility; enter the confreg command at the ROM monitor prompt as follows:
Step 7 Answer yes to the enable ignore system config info? question, and note the current configuration register settings.
Step 8 Initialize the router by entering the reset command as follows:
The router initializes, the configuration register is set to 0x142, and the router boots the system image from flash memory and enters the System Configuration Dialog prompt as follows:
--- System Configuration Dialog --
Step 9 Enter no in response to the System Configuration Dialog prompts until the following message is displayed:
Press RETURN to get started!
Step 10 Press Return. The user EXEC prompt is displayed as follows:
Step 11 Enter the enable command to enter privileged EXEC mode. Then enter the show startup-config command to display the passwords in the configuration file as follows:
Router# show startup-config
Step 12 Scan the configuration file display looking for the passwords (the enable passwords are usually near the beginning of the file, and the console login or user EXEC password is near the end). The passwords displayed look something like this:
enable secret 5 $1$ORPP$s9syZt4uKn3SnpuLDrhuei
enable password 23skiddoo
line con 0
The enable secret password is encrypted and cannot be recovered; it must be replaced. The enable and console login passwords may be encrypted or clear text. Proceed to the next step to replace an enable secret, console login, or enable password. If there is no enable secret password, note the enable and console login passwords, if they are not encrypted, and proceed to Step 17.
Do not execute the next step unless you have determined you must change or replace the enable, enable secret, or console login passwords. Failure to follow the steps as shown might cause you to erase your router configuration.
Step 13 Enter the configure memory command to load the startup configuration file into running memory. This action allows you to modify or replace passwords in the configuration.
Router# configure memory
Step 14 Enter the privileged EXEC configure terminal command to enter configuration mode:
Hostname# configure terminal
Step 15 Change all three passwords using the following commands:
Hostname(config)# enable secret newpassword1
Hostname(config)# enable password newpassword2
Hostname(config)# line con 0
Hostname(config-line)# password newpassword3
Change only the passwords necessary for your configuration. You can remove individual passwords by using the no form of the above commands. For example, entering the no enable secret command removes the enable secret password.
Step 16 You must configure all interfaces to be not administratively shut down as follows:
Hostname(config)# interface gigabitethernet 0/0
Hostname(config-int)# no shutdown
Enter the equivalent commands for all interfaces that were originally configured. If you omit this step, all interfaces are administratively shut down and unavailable when the router is restarted.
Step 17 Use the config-register command to set the configuration register to the original value noted in Step 3 or Step 8, or to the factory default value 0x2102 as follows:
Hostname(config)# config-register 0x2102
Step 18 Press Ctrl-Z (hold down the Control key while you press Z) or enter end to exit configuration mode and return to the EXEC command interpreter.
Do not execute the next step unless you have changed or replaced a password. If you skipped Step 13 through Step 16, skip to Step 20. Failure to observe this caution causes you to erase your router configuration file.
Step 19 Enter the copy running-config startup-config command to save the new configuration to NVRAM.
Step 20 Enter the reload command to reboot the router.
Step 21 Log in to the router with the new or recovered passwords.
This completes the steps for recovering or replacing a lost enable, enable secret, or console login password.
Recovering the Password When a Standby RP Is Included in the System
If a standby RP is included in the system, perform the following procedure to recover the password:
NoteYou need not perform the password recovery procedure on the standby RP. After you bypass the NVRAM (startup-config) on the active RP, subsequent reloads of the standby RP synchronize the running-config of the standby RP with the running-config of the active RP.
1. Connect to the console port of the standby RP. It is recommended that you create a console port connection to the standby RP and not use the console port of the active RP.
2. Reset both RPs to the ROMmon prompt. See the “Details of the Password Recovery Procedure” section for information about the procedure.
Do not reboot the standby RP at this point. Leave it at the ROMmon prompt.
3. Perform the password recovery procedure on the active RP. See the “Details of the Password Recovery Procedure” section for information about the procedure.
4. After the running-config of the active RP has been modified with the password removed from the running-config, save the new running-config to NVRAM (that is, copy the contents of the running-config to the startup-config).
5. Start the standby RP.
The standby RP synchronizes its configuration with that of the active RP. The new configuration does not include a password.