2011-07-29

Cisco Switch Password Recovery

Learn to configure Cisco switches are very nice. You may have experienced something, when you will configure the switch, there was a switch attached password, and you do not know or forget the password that has been configured or setup. Well, this time we will discuss about how to perform password recovery on cisco switches, if the above situation happened to you.
  1. Connect your PC with terminal-emulation software (ex: Hyper Terminal) to the console port switches.
  2. Setting line speed on the emulation software to 9600 baud.
  3. Turn off the switch. Reconnect the power cable to the switch and, within 15 seconds press the Mode button for the green System LED flashes. Continue to press the Mode button until the System LED turns green then yellow-green color light; then release the Mode button.
Several lines of information instructions appear, telling if the password recovery procedure has been dinontaktifkan or not. If you see information like:
The system has been interrupted prior to initializing the flash file system.
The following commands will initialize the flash file system

Continue the process on the "Procedure with Password Recovery enabled", follow the steps indicated.
If the message appears:


The password-recovery mechanism has been triggered, but is
currently disabled.

Continue the process on the "Procedure with Password Recovery dinontaktifkan", and follow the steps indicated.

After the recovery password, reload the switch by:


Switch> reload
Proceed with reload? [confirm] y

Procedure with Password Recovery enabled

If the password-recovery mechanism is enabled, the following message appears:


The system has been interrupted prior to initializing the flash
file system.
The following commands will initialize the flash file system,
and finish loading the operating system software:
flash_init
load_helper
boot

Step 1. Initialize the flash file system:
Switch: flash_init

Step 2. If we had to console port speed setting other than 9600. Change the emulation software line speed according to the switch console port.

Step 3. Call the helper files:
Switch: load_helper

Step 4. Show the contents of flash memory:
Switch: dir flash:

The system switch displays:        
Directory of flash:
13 drwx 192 Mar 01 1993 22:30:48 c2960-lanbasemz.
122-25.FX
11 -rwx 5825 Mar 01 1993 22:31:59 config.text
18 -rwx 720 Mar 01 1993 02:21:30 vlan.dat
16128000 bytes total (10003456 bytes free)

Step 5. Change the configuration file into config.text.old
This file contains the password definition.


Switch: rename flash:config.text flash:config.text.old

Step 6. Boot the system:
Switch: boot

We will be asked to start the setup program. At the prompt give the answer N.

Continue with the configuration dialog? [yes/no]: N

Step 7. At the switch prompt, enter privileged EXEC mode:
Switch> enable
Step 8. Change the configuration file to its original name:
Switch # rename flash: flash config.text.old: config.text
Step 9. Copy the configuration file into memory:
Switch # copy flash: config.text system: running-config
Source filename [config.text]?
Destination filename [running-config]?Press the enter button to respond to a confirmation prompt.
The configuration file will be called back, and we can change the password
Step 10. Go to global configuration mode:
Switch # configure terminal
Step 11. Change password:
Switch (config) # enable secret password
Secret passwords can be 1 to 25 characters alpanumerik, can be started with a number, is case sensitive.
Step 12. Return to privileged EXEC module:
Switch (config) # exit
Switch #Step 13. Save the running configuration to the startup configuration file:
Switch # copy running-config startup-config
Procedure with Password Recovery Disable
If the password-recovery mechanism is disabled, will appear the following message:
The password-recovery mechanism has been triggered, but is currently disabled. Access to the boot loader prompt through the password-recovery mechanism is disallowed at this point. However, if you agree to let the system be reset back to the default system configuration, access to the boot loader prompt can still be allowed.
Would you like to reset the system back to the default configuration (y / n)?
If we answer n (no), the normal boot process will continue, and we can not access the boot loader prompt, will appear the following message:
Press Enter to continue ... ... ..
However, if we answer y (yes), the configuration file in flash memory and the VLAN database file will be deleted. When the default configuration is called, we can set the password again.
Step 1. Choose to go with a password recivey and lose the existing configuration:
Would you like to reset the system back to the default configuration (y / n)? Y
Step 2. Call the helper files:
Switch: load_helper
Step 3. Show the contents of flash memory:
switch: dir flash:
System switch displays:
Directory of flash:

13 drwx 192 March 01 1993 22:30:48 c2960-lanbasemz.122-25.FX.0
16128000 bytes total (10003456 bytes free)Step 4. Boot the system:
Switch: boot
You will be prompted to start the setup program. To continue with password recovery, provide answers to the N at the prompt.
Continue with the configuration dialog? [Yes / no]: N
Step 5. At the switch prompt, enter privileged mode:
Switch> enable
Step 6. Go to global configuration mode:
Switch # configure terminal
Step 7. Change password:
Switch (config) # enable secret password
Secret passwords can consist of 1 to 25 characters alpanumerik, can be started with a number, is case sensitive.
Step 8. Return to privileged EXEC module:
Switch (config) # exit
Switch #Step 9. Copy the running configuration to the startup configuration file;
Switch # copy running-config startup-config
* Source: Student Lab Manual (Exploration 4.0) Cisco Academy Programs.
   
  


 

No comments:

Post a Comment