Jesin's Blog

Welcome to the Portal of Technology

  • Facebook
  • GitHub
  • RSS
  • Twitter
  • Home
  • Categories
    • Domains
    • Linux
    • Networking
    • PHP
    • Virtualization
    • Web Design
    • Web Servers
    • Windows
  • WordPress Plugins
    • Custom Error Pages
    • HTTP Digest Authentication
    • Mailgun Email Validator
  • Toolbox
    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool
  • About Me
  • Contact Me
  • Sitemap
Home ›
Networking ›
How to recover a Cisco device password

How to recover a Cisco device password

January 14, 2012 Networking Jesin A Leave a Comment

networking category thumbnail

Even if you forget your Cisco device (read router or switch) password you can recover it by following the steps outlined in this article. This includes enable passwords, secret passwords, telnet, SSH and console passwords. This process involves changing the configuration register of your Cisco device so that it ignores the NVRAM contents and loads the default configuration. For this process you have to get into the ROM monitor mode so you need to have serial console access to the Cisco switch/router.

Enter into ROM monitor mode

When the router boots interrupt the boot sequence by pressing [CTRL] + [BREAK] and you should see something like this

Self decompressing the image :
##############
monitor: command "boot" aborted due to user interrupt
rommon 1 >

Now we’re inside the ROM monitor mode.

Change the configuration register

Change the configuration register to 0x2142 so that the device ignores the NVRAM contents and reboot it.

rommon 1 > confreg 0x2142
rommon 2 > reset

Copy the startup configuration

After the device reboots the running configuration doesn’t have anything but the bare minimal settings. Now you should copy the startup configuration so that you can modify the password in it.

Router>enable
Router#copy startup-config running-config

Reset the required password

Enter the command to reset the password you forgot. If you used local authentication

R0(config)#username jesin secret passwd

The above command will reset the password of the user “jesin”, if such a user doesn’t exist a new user is created by that name.

To reset an enable password or secret

R0(config)#enable password newpwd
R0(config)#enable secret newpwd

Reset a console password

Router(config)#line console 0
Router(config-line)#password newconsolepw

Reset a telnet password

Router(config)#line vty 0 4
Router(config-line)#password newtelnetpw

Save the running configuration

Make sure the changes made to the passwords are saved in the running configuration

Router#copy running-config startup-config

Reset the Configuration Register and reload

Now that the work is over reset the configuration register to its original value

Router(config)#config-register 0x2102

Now reboot the Cisco device.

Related posts:

networking category thumbnailConfigure Cisco Console Password networking category thumbnailConfigure Cisco Routers and Switches for Telnet Access networking category thumbnailConfigure Cisco Routers for SSH Access networking category thumbnailHow to Configure PPP in Cisco Routers networking category thumbnailConfigure Inter-VLAN routing on Cisco Router

Tags: cisco

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Get a wealth of information delivered to your inbox. Subscribe and never miss a single article.

  • Tutorials and howtos
  • Code, scripts and commands
  • Online Tools

* No spam, unsubscribe anytime

Hire Me

  • SSL installation and hardening (A+ on Qualys SSL test)
  • Apache & Nginx configuration
  • Email deliverability improvement (10/10 on Mail Tester & MailGenius)
  • WordPress customization, optimization and migration
  • and much more…

    Tools

    • DNS Lookup Tool
    • htdigest Generator Tool Online
    • htpasswd Generator Tool Online
    • HTTP Headers Lookup Tool
    • MD5 Encryption Tool
    • Open Port Check Tool
    • SHA-1 Encryption Tool
    • URL Encoding/Decoding Tool

    Nav

    • Home
    • About Me
    • Contact Me
    • Privacy Policy
    • Sitemap
    Vultr SSD VPS

    Creative Commons License
    Jesin's Blog by Jesin A is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
    Based on a work at websistent.com.