It’s a bit different from the Cisco router.

Password recovery for Catalyst switches is a bit different than for Cisco routers. password recovery for Catalyst switches does not involve booting in the ROM monitor or changing the configuration register. password for Catalyst switches. This section explains the recovery process.

Password recovery on the Catalyst 3750. the procedure may vary depending on the Catalyst switch model.

Password Recovery Procedure

Step 1. Connect to the console port

Connect to the console port of the Catalyst switch.

Step 2. Hard booting the switch

Turn off the Catalyst switch and turn it on again. Press and hold the MODE button on the front of the enclosure as you turn it on; release the MODE button about 15 seconds after the SYST LED turns green.

The console will display a “switch:” prompt.

Step 3. Enter flash_init command

Enter the “flash_init” command to initialize the flash file system.

switch: flash_init

Step 4. Enter the load_helper command

Enter the “load_helper” command.

switch: load_helper

Step 5. Confirmation of the configuration file

Use the “dir flash:” command to check the configuration file in the flash file system. The configuration file is “config.text”.

switch: dir flash:

Step 6. Renaming the configuration file

Rename the configuration file “config.text”.

switch: rename flash:config.text flash:config.old

The name of the file does not have to be “config.old”. Renaming the configuration file prevents the configuration file from being read at boot time. The procedure is similar to changing the configuration register to 0x2142 during password recovery on the router.

Step7. Starting the Catalyst switch

Boot the system with the “boot” command.

switch: boot

Step 8. Switch to privileged EXEC mode

The switch will boot up in its initial state. Do not enter the setup mode. You can use the “enable” command to enter privileged EXEC mode without a password.

Switch>enable
Switch#

Step 9. Restore the file name of the configuration file

Change the file name of the flash memory configuration file back to the original “config.text”.

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

Step 10. Restore your configuration.

Copy the configuration from “config.text” to running-config to restore the configuration.

Switch#copy flash:config.text running-config

In this case, the layer 3 interfaces may remain shutdown. Activate the necessary layer 3 interfaces with no shutdown.

Step 11. Resetting your password

Set a new password.

Switch#configure terminal
Switch(config)#enable secret <password>

Step 12. Saving your configuration.

Saves the reset password setting.

Switch#copy running-config startup-config

Example of Password Recovery

This is the output of the console while performing password recovery on the Catalyst 3750 series.

Base ethernet MAC Address: 00:12:80:49:36:00
Xmodem file system is available.
The password-recovery mechanism is enabled.

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

    flash_init
    load_helper
    boot


switch: flash_init  ←Step3.
Initializing Flash...
flashfs[0]: 361 files, 7 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 15998976
flashfs[0]: Bytes used: 7117824
flashfs[0]: Bytes available: 8881152
flashfs[0]: flashfs fsck took 8 seconds.
...done Initializing Flash.
Boot Sector Filesystem (bs) installed, fsid: 3
Setting console baud rate to 9600...

switch: load_helper  ←Step4.

switch: dir flash:  ←Step5.
Directory of flash:/

2    -rwx  676                      vlan.dat
3    drwx  192                      c3750-ipbase-mz.122-25.SEB
361  -rwx  1928                     pim.cfg
362  -rwx  1321                     config.text
363  -rwx  1444                     ospf.cfg
364  -rwx  1930                     ipv6-mcast.cfg
365  drwx  0                        crashinfo_ext
366  -rwx  5                        private-config.text
367  drwx  64                       crashinfo

8881152 bytes available (7117824 bytes used)

switch: rename flash:config.text flash:config.old  ←Step6.

switch: dir flash:
Directory of flash:/

2    -rwx  676                      vlan.dat
3    drwx  192                      c3750-ipbase-mz.122-25.SEB
361  -rwx  1928                     pim.cfg
362  -rwx  1321                     config.old
363  -rwx  1444                     ospf.cfg
364  -rwx  1930                     ipv6-mcast.cfg
365  drwx  0                        crashinfo_ext
366  -rwx  5                        private-config.text
367  drwx  64                       crashinfo

8881152 bytes available (7117824 bytes used)

switch: boot  ←Step7.
Loading "flash:c3750-ipbase-mz.122-25.SEB/c3750-ipbase-mz.122-25.SEB.bin"...@@@
- omitted -


Switch   Ports  Model              SW Version              SW Image
------   -----  -----              ----------              ----------
*    1   26     WS-C3750-24TS      12.2(25)SEB             C3750-IPBASE-M




Press RETURN to get started!


00:00:43: %STACKMGR-6-SWITCH_ADDED: Switch 1 has been ADDED to the stack
00:00:44: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to down
00:00:44: %SPANTREE-5-EXTENDED_SYSID: Extended SysId enabled for type vlan
00:01:05: %STACKMGR-6-SWITCH_READY: Switch 1 is READY
00:01:05: %STACKMGR-6-STACK_LINK_CHANGE: Stack Port 1 Switch 1 has changed to state DOWN
00:01:05: %STACKMGR-6-STACK_LINK_CHANGE: Stack Port 2 Switch 1 has changed to state DOWN
00:01:05: %STACKMGR-6-MASTER_READY: Master Switch 1 is READY
00:01:06: %SYS-5-RESTART: System restarted --
Cisco IOS Software, C3750 Software (C3750-IPBASE-M), Version 12.2(25)SEB, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2005 by Cisco Systems, Inc.
Compiled Thu 17-Mar-05 22:58 by yenanh

Would you like to terminate autoinstall? [yes]:


         --- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]: no  
Switch>
Switch>enable  ←Step8.
Switch#rename flash:config.old flash:config.text  ←Step9.
Destination filename [config.text]?
Switch#dir flash:
Directory of flash:/

    2  -rwx         676   Mar 1 1993 00:01:34 +00:00  vlan.dat
    3  drwx         192   Mar 1 1993 00:08:36 +00:00  c3750-ipbase-mz.122-25.SEB
  361  -rwx        1928   Mar 1 1993 01:43:30 +00:00  pim.cfg
  362  -rwx        1321   Mar 1 1993 00:03:16 +00:00  config.text
  363  -rwx        1444   Mar 1 1993 00:28:05 +00:00  ospf.cfg
  364  -rwx        1930   Mar 1 1993 04:06:03 +00:00  ipv6-mcast.cfg
  365  drwx           0   Mar 1 1993 00:12:09 +00:00  crashinfo_ext
  366  -rwx           5   Mar 1 1993 00:03:16 +00:00  private-config.text
  367  drwx          64   Mar 1 1993 00:00:44 +00:00  crashinfo

15998976 bytes total (8881152 bytes free)
Switch#copy flash:config.text running-config  ←Step10.
Destination filename [running-config]?

1321 bytes copied in 0.185 secs (7141 bytes/sec)
N-Study#  ←The hostname has changed since the configuration was restored.
00:02:54: %LINK-5-CHANGED: Interface Vlan1, changed state to administratively down
N-Study#configure terminal
N-Study(config)#enable secret cisco  ←Step11.
N-Study(config)#end
N-Study#copy
00:03:15: %SYS-5-CONFIG_I: Configured from console by consolerun
N-Study#copy running-config startup-config  ←Step12.
Destination filename [startup-config]?
Building configuration...
[OK]
N-Study#

Cisco Basic