Introduction
This document describes how to recover the enable password and the enable secret passwords. These passwords protect access to privileged EXEC and configuration modes. The enable password password can be recovered, but the enable secret password is encrypted and must be replaced with a new password. Use the procedure described in this document in order to replace the enable secret password.
The enable password or the enable-secret password is stored in the startup configuration file in the nonvolatile RAM (NVRAM). The password recovery procedure requires that you boot the router and ignore the startup configuration file in the NVRAM. In order to boot the router and ignore the startup configuration file, set the 6th bit in the configuration register. The router boots with the default configuration and all the interfaces in “shutdown” state.
Since the default configuration does not have a password, anyone can enter enable mode on the router. In order to return the router to the original configuration, the startup configuration file can be copied into the router memory. If you are already in the enable mode, you can either view or change the enable password, but you can only change the enable secret password because it is always encrypted in the show commands. This document describes this procedure.
Note: Password recovery procedures cannot be performed through a Telnet connection.
Cisco 2000 Series Routers
Cisco 2500 Series Routers
Cisco 3000 Series Routers
Cisco 4000 Series Routers
Cisco AccessPro
Cisco 7000 Route Processor (RP)
Cisco AGS+ Routers
Cisco IGS Router Series
Cisco STS-10x Access Servers
Step-by-Step Procedure
1. Attach a terminal or PC with terminal emulation to the console port of the router.
Use these terminal settings:
9600 baud rate
No parity
8 data bits
1 stop bit
No flow control
2. If you can access the router, type show version
at the prompt, and record the configuration register setting. See Example of Password Recovery Procedure in order to view the output of a show version command.
Note: The configuration register is usually set to 0×2102
or 0×102
. If you can no longer access the router (because of a lost login or TACACS password), you can safely assume that your configuration register is set to 0×2102
.
3. Use the power switch in order to turn off the router, and then turn the router back on.
4. Press Break
on the terminal keyboard within 60 seconds of power up in order to put the router into ROMmon.
5. At the prompt, type o
, press ENTER, and record the current value of the configuration register (usually 0×2102 or 0×102).
>o
!— Shows the configuration register option settings.
Configuration register = 0×2102 at last boot
Bit# Configuration register option settings:
15 Diagnostic mode disabled
!— Output supressed.
6. Type o/r 0×2142
, and press ENTER
at the >
prompt in order to boot from Flash and bypass the configuration file.
7. Type i
at the >
prompt, and press ENTER
.
The router reboots, but ignores the saved configuration.
8. Type no
after each setup question, or press CTRL + C
in order to skip the initial setup procedure.
9. Type enable
at the Router>
prompt.
Once the Router#
prompt appears, you are in enable mode.
10. Type configure memory
or copy startup-config running-config
in order to copy the NVRAM into memory.
Important :
Do not type copy running-config startup-config
or write memory
. These commands erase your startup configuration.
11. Type write terminal
or show running-config.
The show running-config
and write terminal
commands show the configuration of the router. In this configuration, the shutdown
command appears under each interface, which means all interfaces are currently shutdown. Also, the passwords display either encrypted or unencrypted.
12. Type configure terminal
, and make the changes.
The hostname(config)#
prompt appears.
13. Type enable secret
in order to change the enable secret password.
14. Issue the no shutdown
command on every interface that is used. If you issue a show ip interface brief command after you exit configuration mode, every interface that you want to use displays up up.
15. Type config-register 0×2102
(or use the value you recorded in step 4).
This step causes the router to load the Cisco IOS software from the Flash with the configuration from NVRAM at the next reload.
16. Press CTRL + Z
in order to leave the configuration mode.
The hostname#
prompt appears.
17. Type write memory
or copy running-config startup-config
in order to commit the changes.
18. Type Reload
in order to restart the router and force the Cisco IOS software to boot from the Flash.