The procedure for resetting a password on a Cisco router is fairly standard with small variations across different models. The procedure involves setting up a physical connection with the router, rebooting and reconfiguring from the console to bypass the startup configuration, and rebooting again. Once you are able to re-enter global configuration mode without a password, set a new password. Reversing the earlier configuration changes and resetting one more time will regain the original configuration with the new password.
For security reasons, resetting a Cisco password requires physical access to prevent unauthorized attempts to gain access. Once a connection is made between a terminal or a PC to the serial or console port on the router, reboot the router and enter the break key sequence "Ctrl-Break or Ctrl-C" to stop the boot process. At the "rommon >" prompt, instruct the router to skip the startup configuration by entering "confreg 0x2142" then "reset" at the prompt to reboot the router with a blank configuration. Once the router has rebooted, answer no to any startup configuration questions.
Enter "enable" at the "Router>" prompt, and a password should not be required before seeing a "Router#" prompt. Now that you are past the point a password is needed, you can load the startup configuration into memory by using "copy start run". Change to global configuration mode by entering "config t". Set the password using "config secret newpassword" where "newpassword" is your new password. To reset the register on the router to read its startup configuration once again, enter "config-register 0x2102" then exit global configuration mode.
Finally, copy the current configuration with the new password to the startup configuration by entering "copy run start" and reboot. You router password has now been reset.