Cisco Tips & Tricks

May 3, 2006

Recovering Lost passwords on remote devices

Filed under: Uncategorized — ciscotips @ 6:07 pm

Configuring a Simple Network Management Protocol (SNMP) read-write (RW) community ahead of time can enable  you to modify the configuration of a device if you need to recover a lost password from a remote router or switch.  Use following steps:

1. Set the copy mode (1.- TFTP; 3.-RCP)

snmpset ipAddress RW-Community .1.3.6.1.4.1.9.9.96.1.1.1.1.2.83119 i 1

2. Set the source configuration type to copy (1.-Network; 3.-Startup-config; 4.-Running-Config):

snmpset ipAddress RW-Community .1.3.6.1.4.1.9.9.96.1.1.1.1.3.83119 i 4

3. Set the destination configuration type to copy (1.Network; 3.-Startup-config; 4.-Running-Config):

snmpset ipAddress RW-Community .1.3.6.1.4.1.9.9.96.1.1.1.1.4.83119 i 1

4. Set the TFTP server IP address:

snmpset ipAddress RW-Community .1.3.6.1.4.1.9.9.96.1.1.1.1.5.83119 a TFTP-SRV-ipAddress

5. Set the name of the file that contains my device configuration:

snmpset ipAddress RW-Community .1.3.6.1.4.1.9.9.96.1.1.1.1.6.83119 s “Mydevice

Config.txt”

6. Set the create and go command:

 snmpset ipAddress RW-Community .1.3.6.1.4.1.9.9.96.1.1.1.1.14.83119 i 1

Then just modify the password in a file named MydeviceConfig.txt and run the command again, modifying the following lines:

1. Set source configuration type to copy (1.-Network; 3.-Startup-config; 4.-Running-Config):

snmpset ipAddress RW-Community .1.3.6.1.4.1.9.9.96.1.1.1.1.3.83119 i 1

2. Set destination configuration type to copy (1.-Network; 3.-Startup-config; 4.-Running-Config):

snmpset ipAddress RW-Community .1.3.6.1.4.1.9.9.96.1.1.1.1.4.83119 i 4

Be careful when you modify and upload the configuration to the device, and remember that the destination is Running-Config, so you must ingress to thedevice to change the password again and then write this to the startup configuration.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: