Password Reset Cisco Catalyst 2950

This is the procedure that I used to reset a series of “salvaged” Cisco 2900’s. It might work on other switches in the same series, YMMV.

Requirements

  • Cisco Console Cable
  • Cisco Catalyst 2950
  • Terminal Program

Procedure

  1. Connect the console cable to the Catalyst 2950
  2. If the Catalyst 2950 is already powered up, remove AC power
  3. Start your terminal program. I generally use something like cu -l /dev/ttyS0 -s 9600
  4. Holding down the Mode button on the front panel, apply AC power. Continue to hold down the Mode button until the Status led flashes amber. If everything is OK, you should see output similar to the following;
    C2950 Boot Loader (C2950-HBOOT-M) Version 12.1(11r)EA1, RELEASE SOFTWARE (fc1)
    Compiled Mon 22-Jul-02 17:18 by antonino
    WS-C2950T-24 starting...
    Base ethernet MAC Address: 00:0f:8f:db:58:c0
    Xmodem file system is available.
    
    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:
    
  5. As we have interrupted the boot before flash has been initialized, we need to initialize the flash memory. Initialize flash with the flash_init command.
    switch: flash_init
    Initializing Flash...
    flashfs[0]: 82 files, 3 directories
    flashfs[0]: 0 orphaned files, 0 orphaned directories
    flashfs[0]: Total bytes: 7741440
    flashfs[0]: Bytes used: 5989376
    flashfs[0]: Bytes available: 1752064
    flashfs[0]: flashfs fsck took 8 seconds.
    ...done initializing flash.
    Boot Sector Filesystem (bs:) installed, fsid: 3
    Parameter Block Filesystem (pb:) installed, fsid: 4
    switch:
    
  6. Since we are still using the basic bootloader, we need to load an additional helper image
    switch: load_helper
    
  7. View the contents of flash
    switch: dir flash:
    Directory of flash:/
    
    2    -rwx  2980731                  c2950-i6q4l2-mz.121-19.EA1c.bin
    3    -rwx  270                      env_vars
    4    -rwx  1456                     vlan.dat
    5    -rwx  99                       private-config.text
    7    -rwx  110                      info
    8    drwx  2432                     html
    85   -rwx  110                      info.ver
    86   -rwx  6617                     config.text
    
    1752064 bytes available (5989376 bytes used)
  8. Notice config.text. This is the configuration file. We must rename the config.text file.
    switch: rename flash:config.text flash:config.old
    
  9. Now boot the ISO image as normal. ”’When asked Would you like to enter the initial configuration dialog? [yes/no]”’, choose ”’n”’
    switch: boot
    
    Loading "flash:/c2950-i6q4l2-mz.121-19.EA1c.bin"...##################################################################################################################################################################################################################################################################################################
    
    File "flash:/c2950-i6q4l2-mz.121-19.EA1c.bin" uncompressed and installed, entry point: 0x80010000
    
    executing...
    
                 Restricted Rights Legend
    
    Use, duplication, or disclosure by the Government is
    subject to restrictions as set forth in subparagraph
    (c) of the Commercial Computer Software - Restricted
    Rights clause at FAR sec. 52.227-19 and subparagraph
    (c) (1) (ii) of the Rights in Technical Data and Computer
    Software clause at DFARS sec. 252.227-7013.
    
               cisco Systems, Inc.
               170 West Tasman Drive
               San Jose, California 95134-1706
    
    
    
    Cisco Internetwork Operating System Software 
    IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(19)EA1c, RELEASE SOFTWARE (fc2)
    Copyright (c) 1986-2004 by cisco Systems, Inc.
    Compiled Mon 02-Feb-04 23:29 by yenanh
    Image text-base: 0x80010000, data-base: 0x8058A000
    
    
    Initializing flashfs...
    flashfs[1]: 82 files, 3 directories
    flashfs[1]: 0 orphaned files, 0 orphaned directories
    flashfs[1]: Total bytes: 7741440
    flashfs[1]: Bytes used: 5989376
    flashfs[1]: Bytes available: 1752064
    flashfs[1]: flashfs fsck took 7 seconds.
    flashfs[1]: Initialization complete.
    Done initializing flashfs.
    POST: System Board Test : Passed
    POST: Ethernet Controller Test : Passed
    ASIC Initialization Passed
    
    POST: FRONT-END LOOPBACK TEST : Passed
    cisco WS-C2950T-24 (RC32300) processor (revision P0) with 20808K bytes of memory.
    Processor board ID XXXXXXXXXXX
    Last reset from system-reset
    Running Enhanced Image
    24 FastEthernet/IEEE 802.3 interface(s)
    2 Gigabit Ethernet/IEEE 802.3 interface(s)
    
    32K bytes of flash-simulated non-volatile configuration memory.
    Base ethernet MAC Address: 00:0F:8F:XX:XX:XX
    Motherboard assembly number: 73-6114-10
    Power supply part number: 34-0965-01
    Motherboard serial number: XXXXXXXXXX
    Power supply serial number: XXXXXXXXXX
    Model revision number: P0
    Motherboard revision number: A0
    Model number: WS-C2950T-24
    System serial number: XXXXXXXXXX
    
             --- System Configuration Dialog ---
    
    Would you like to enter the initial configuration dialog? [yes/no]: n
    
    Press RETURN to get started!
    
    
    Switch>
    
  10. With the image booted you may now copy the previous config file to the running-config
    Switch>enable
    Switch#copy flash:config.old system:running-config
    Destination filename [running-config]? 
    
    6617 bytes copied in 4.868 secs (1359 bytes/sec)
    
    c2950#
    
  11. With the previous config now loaded as the running-config, you may now change the passwords
    c2950#conf t
    
    Enter configuration commands, one per line.  End with CTRL/Z.
    
    c2950#(config)#enable secret PASSWORD
    c2950#(config)#enable password OTHER_PASSWORD
    (CTRL/Z)
    
  12. With changes made to the configuration, remember to ”’SAVE”’ the configuration. (I’ve been fscked by this in the past)
    c2950#write memory
    Building configuration...
    [OK]
    c2950#
  13. Restart the switch (Unplug the AC), allow it to boot, and login!