32 Cisco LAN Switching Configuration Handbook
Tip You can find additional information about the password recovery procedure for
Cisco Catalyst Layer 2 fixed configuration switches at http://www.tinyurl.com/4jmw4.
Feature Example
This example shows a typical password recovery procedure 1 for IOS switches.
The system has been interrupted prior to initializing the Flash file system. The following
commands initialize the Flash file system and finish loading the operating system software:
switch: flash_init
Initializing Flash...
flashfs[0]: 143 files, 4 directories
flashfs[0]: 0 orphaned files, 0 orphaned directories
flashfs[0]: Total bytes: 3612672
flashfs[0]: Bytes used: 2729472
flashfs[0]: Bytes available: 883200
flashfs[0]: flashfs fsck took 86 seconds
....done Initializing Flash.
Boot Sector Filesystem (bs:) installed, fsid: 3
Parameter Block Filesystem (pb:) installed, fsid: 4
switch: load_helper
switch: dir flash:
Directory of flash:
2 -rwx 843947 Mar 01 1993 00:02:18 C2900XL-ms-12.2.8.bin
4 drwx 3776 Mar 01 1993 01:23:24 html
66 -rwx 130 Jan 01 1970 00:01:19 env_vars
68 -rwx 1296 Mar 01 1993 06:55:51 config.text
1728000 bytes total (456704 bytes free)
rename flash:config.text flash:config.old
boot
Continue with the configuration dialog? [yes/no] : N
Switch>enable
Switch# rename flash:config.old flash:config.text
Switch# copy flash:config.text system:running-config
Switch# configure terminal
Switch(config)# enable secret newpassword
Switch(config)# line vty 0 4
Switch(config-line)# password newpassword
Switch(config)# line con 0
Switch(config-line)# password newpassword
Switch#(config-line)# end
Switch# copy running-config startup-config