Recovering Cisco Router Passwords
You may think that forgetting passwords is the most common method of loosing them, but there are a number
of other ways. Probably the most common cause of lost passwords that I have seen is someone leaving the company and not leaving
the correct passwords behind, and of course you can’t get hold of them to ask for the right passwords. It is
for reasons like this that I have had to recover passwords on more than one occasion for Cisco routers (as well as a number
of other things that may pop up in other articles).
If you find yourself hopelessly locked out of your Cisco router, the first thing you will need to do is
get a copy of the souped up version of Hyperterminal (version 3.0 or higher) from http://www.hilgraeve.com because the version that comes with Windows does not send the right break characters which you will desperately need later
on. Once you have that in hand (or rather, on disk) use the following steps to get your router back:
- Connect a computer to the router’s
Console port using the Console cable that came with your router (it is usually flat and light blue).
- Turn the router off using the power switch and
turn it back on.
- Once text starts popping up on the screen, send
the break command CTRL + B or CTRL +BREAK (sometimes it is CTRL +X). This will abort the boot and present you with a rommon
1> prompt
- From the new prompt you need to change the configuration
register using the following command: confreg 0x2142
- If you are using an older model of router you may
need to enter o/r 0x2142
- Now you need to recycle the router with the reset command.
- If you used the o/r command then reset the router
with the I command
- Once the router finishes restarting you will find
that there are no passwords to deal with, so you can enter enabled mode carte blanche.
- Once in enabled mode enter this: copy start run. This will copy the startup config to the running config.
- Now, go into configuration mode with the config t command
- Once there enter the new password with the enable secret password command (i.e. enable secret
Bob11).
- Now set the configuration register back to normal
with this command: confreg 0x2102
- Exit config mode and enter the command copy run start to copy the new configuration to ram.
- Now it is time to reload your router
- Once the router is back up you need to configure
all of your interfaces with the no shutdown command or they will not work.
And that is all there is to it. Heaven forbid you ever loose you passwords, but if you do I hope this helps
get you back to normal in short order.