A simple search in a search engine such as Google for Cisco password recovery will show you documents
such as the following, which give you step by step instructions for recovering passwords from various
devices.
Here's an example for the Cisco 2900 Integrated Services Router.
Documents such as the following will show you a step-by-step procedure for recovering the passwords.
So, for example, either switch off or shut down the router, remove the compact flash that is on the
back of the router.
Here's an example of a 2951,
you can get more information about the back panel slots and connectors on the various routers once again
from Cisco's website.
So as an example, you are shown here on 2901 where the compact flash is 01 and that'll
continue for various routers of different descriptions.
So as an example for 2911 the compact flash is found here and here, so you need to remove the compact
flash as an example and then switch on the router.
Once the router is in ROM MON mode, reinsert the compact flash and then type CONF REG 0x2142 at
the ROM MON prompt.
Now, as part of this course, you'll have access to the configure register software.
This allows you to see various options for the configuration register.
So as an example, if you set it to 2142, as shown on the Cisco website.
That shows you that it ignores NVRAM contents.
So bit-6 is set on, in other words, the third hexadecimal value, and if you remember, a hex
values is 4 binary bits, this bit, bit-6 is set on, which means ignore and NVRAM contents.
So the router will boot up, but it will ignore any saved configuration.
You type reset to reboot the router.
So the router will now reboot but ignore the saved configuration.
You need to type no or control see to skip the initial set up procedure, then type enable at the
router a prompt and then type configure memory or copy start up config to running-config
and then you could change the password by typing configure terminal, enable secret and whatever password
you want to configure.
You will need to no-shut any interfaces that you want to use when the router boots, all interfaces
will be in the down state when you copy your config from start up to running-config.
So you need to manually no-shut them.
You should then use the config register command to set it back to the default register.
So config register is 0x2102 as an example, and then you need to save your config.
This document is great.
It shows you
the full examples of what you're going to be doing, but rather than doing it that way, I'm going to
simply demonstrate this.