Aug 26, 2011

How to recover the lost or forgotten password of Cisco switches?


Today tip will help you to explain the password recovery methods for the Cisco layers 2 switches. You can use these steps also to recover the Cisco layers 3 switches (for example 3550 and 3750 series).  
Follow the step-by-step procedures to recover the lost Cisco switches password: 
First make sure, you have connected your PC to the console port of switch using any emulation software.
Now turn the power switch off and back on to recycle the power then release the mode button for few seconds after the LED above port 1 turns off.
Now your switch first prompt will look like this:
switch: 
 
First run the flash_init command to initialize the flash. 
switch: flash_init
 
After running the flash_init command, the following information will appear as under:
 
1.            switch: flash_init
2.            Initializing Flash...
3.            flashfs[0]: 21 files, 2 directories
4.            flashfs[0]: 0 orphaned files, 0 orphaned directories
5.            flashfs[0]: Total bytes: 7741440
6.            flashfs[0]: Bytes used: 4499456
7.            flashfs[0]: Bytes available: 3241984
8.            flashfs[0]: flashfs fsck took 7 seconds.
9.            ...done initializing flash.
10.        Boot Sector Filesystem (bs:) installed, fsid: 3
11.        Parameter Block Filesystem (pb:) installed, fsid: 4
Now run the load_helper command to load any helper images. 
switch: load_helper 
Issue the dir flash: command to view configuration file name with detail. 
switch: dir flash: 
Now type the rename flash:config.text flash:config.old command to rename the previous configuration file.  
switch: rename flash:config.text flash:config.text.old
Here run the boot command to restart the switch. 
switch: boot
Now after booting process, type enable to enter enable mode at the switch prompt. 
Switch> enable 
Now again type the rename flash:config.old flash:config.text command to rename the previous configuration file.  
Switch#rename flash:config.old flash:config.text 
Here run the copy command to transfer the configuration file to running-config 
Switch#copy flash:config.text system:running-config 
Now go to global configuration mode and set the new password.
Switch# configure terminal 
Switch (config)# enable secret password    (type here new password)
At the end saves the running configuration to NVRAM.
Switch# write memory

No comments:

Post a Comment