Cisco router password recovery involves bypassing the startup configuration via ROM Monitor mode, resetting the enable secret, and restoring the configuration registry to its normal boot value. The process preserves all existing device settings while granting full administrative access.
Router Password Recovery
The process is very similar to a switch, in that what we're going to do is essentially tell the machine to bypass the configuration file, then reload everything with a fresh configuration, then import the old configuration file in and change the password.
What I have to do is restart this router, and then during this restart process I have to hit the Ctrl+Break in order to get into the ROMmon mode. So that's the step we're going to take first: I'm going to reset this router and get into ROMmon mode by holding down the Ctrl+Break keys.
Now that we're in ROMmon mode, what I'm going to do is configure the registry so that it will bypass the configuration file. The way we do that is we type in the command confreg 0x2142, and that is the code to bypass the configuration file. Let's go ahead and hit enter. Then it says you must restart to take on the new configuration, so next I'm going to restart this device.
Now that I've restarted this router, it clearly doesn't have its configuration file — or it skipped its configuration file — because it's asking for initial configuration. I am not going to do an initial configuration with this. We see that there are some interfaces that are coming up and coming down there.
Next what I can do is get into the enable mode, and now I've bypassed the password, so I'm in this device.
The next command takes the configuration file and loads it into the running configuration, and that is copy start run. We're taking the startup file and we're copying it to the running file, because right now there's not a configuration that's running on this. So I'm going to do copy start run, and we're going to copy it over, and yes we do. That should now do the configuration on this device and bring everything up to par.
Next what we're going to do is a show run, to take a look and make sure that all of our configurations are on here. Yes, in fact it is — we see our configurations on this device.
Next what we're going to do is enable — oh, I do need to be in the global configuration mode. So let's get in the global configuration mode and we'll do enable secret, and then we'll do that same secure two as we had before, and we hit enter on that. Now that password is configured on there.
Now we need to save this, so we'll exit out of here and copy, and this time we're going to go from the running configuration to the startup configuration. We'll accept that, and now this is saved with the new password.
The one last thing that we need to do is set it so that when this gets reloaded it's not going to bypass the configuration file again. To do that we have to be in the global configuration mode, and within the global configuration mode we're going to type register and then the registry setting that's going to not bypass the configuration file but actually load it up, and that is two one zero two. So we need to type in 0x2102.
If I want to verify that, I could exit and do a show version, and I will scroll through here and take a look at it: it will be set to 2102 at the next reload. And there you have it — we are now set up and good to go, and we've bypassed the password and still kept all of our same configurations.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →