1. To recover a password on a Cisco 2950/2960 switch, power off the switch while holding the mode button for 5 seconds.
2. Type "flash_init" and "load_helper" to access the file system. Rename the "config.text" file to "config.old" to prevent it from loading.
3. Reset the switch and change the password in global configuration mode. Copy the new configuration to the startup file to save it.