How to Set password recovery for a Cisco-2950 switch (without disrupting the original configuration)

Source: Internet
Author: User
Tags cisco switch


1. Connect the console port of the vswitch to the terminal or PC Super Terminal. 2. Press and hold the mode key on the vswitch and turn on the power. 3. initialize the FlashSwitch: flash_init4. rename the configuration file Switch: rename Flash: config. text Flash: config. old5, restart Switch www.2cto.com Switch: boot6, Switch to privileged mode: enable7, at this time, PasswordSwitch: rename Flash: config. old Flash: config. text8. copy the configuration file to the current system. Switch: copy Flash: config. text system: running-config9, Change Password Switch: enable secret cisco10, save configuration Switch: copy running-config st Artup-config still do not understand? The following is a brief introduction. 1 ., power off, press and hold the mode button to start, until the first five lights are fully on and then loosen MODE2.flash _ init3.dir flash: 4. rename flash: config. text flash: config. old (the suffix can be changed as long as it is not. TEXT.) 5. restart boot 6. enter no7. press enter to enter user mode when entering setup mode, enable to enter privileged Mode 8. rename flash: config. old flash: config. text to change the name back 9. copy flash: config. text system: running-config (this step is to save the previous configuration information, such as HOSTNAME, ip add, VLAN1, DISCRIPTIO, and so on, including the password) 10. conf t enter global configuration 11. enable secret password (remember that there is a space before SECRET, why use SECRET instead Use PASSWORD? If someone else sets SECRET and you set PASSWORD, you still cannot enter the switch, because after the Enable PASSWORD is set, the Enable PASSWORD does not work, so this step sets SECRET as the safest) www.2cto.com 12. wr or copy running-config startup-config in privileged mode (remember to save it. If you do not restart it, the above settings will be lost, and everything will be done from the beginning ~~~ Remember ~~~~~!!!) 13. reloadOK. All done. That's it.
Wireless Internet access is unstable recently, so I want to telnet to the switch connected to the AP to check the configuration of running config. but after the connection, I found that the password was not the original password. I asked the boss, and he did not know it. It is said that the password was changed by the supplier. So the phone supplier asked the password for a long time and got a reply: at that time, the changed employee quit, and now he does not know the password .... dizzy .. too irresponsible .. there is no way to ask for your own, for your own, for google... (Although I have learned how to restore the password of a Cisco router before, but the vswitch and vro are different, the recovery method is also different, but the principle is basically the same)
Password Recovery principle: Generally, the main configuration file (including password, user, policy, and setting) of the CISCO switch is config. text, so what we need to do is to bypass the config in flash memory when the device starts. text directly enters the configuration interface of the switch. At this time, no password is required whether you enter global mode or privileged mode. after you enter the privileged mode, you will re-import config. text File to flash, and then modify the current password. After restart, you can use the new password to enter the privileged mode, and the original configuration content is retained.
Operation steps: 1. Prepare the console cable and connect the Super Terminal. 2. Restart the switch (because 2950 does not have a power switch, you can directly unplug the power cord and connect it back.) 3. Press the MODE key at the start to enter the switch MODE. Note: the action here is faster, otherwise it will be useless to enter the normal mode. 4. After the above startup is complete, you can see the switch: prompt, which is different from the switch> in normal mode and the above three commands.
Switch: flash_init // initialize flashswitch: dir flash: // After initialization, you can see the file Directory of flash:/2-rwx 796 <date> vlan in flash. dat3-rwx 2597 <date> satrat6 drwx 192 <date> c2960-lanbase-mz.122-25.SEE3621-rwx 3137 <date> stgart622-rwx 2601 <date> config. text623-rwx 5 <date> private-config.text24793088 bytes available (7720960 bytes used) Run configuration and password information is saved in config. switch: rename flash: config. text flash: config- Old. text // rename the configuration file so that config can be bypassed at next startup. text File www.2cto.com switch: dir flash: Directory of flash:/2-rwx 796 <date> vlan. dat3-rwx 2597 <date> satrat6 drwx 192 <date> c2960-lanbase-mz.122-25.SEE3621-rwx 3137 <date & gt; stgart622-rwx 2601 <date> config-old.text623-rwx 5 <date> private-config.text24793088 bytes available (7720960 bytes used) switch: reset // restart switch Are you sure you want to reset the reset E M (y/n )? YSystem resetting... wocould you like to terminate autoinstall? [Yes]: // confirm automatic configuration interruption wocould you like to enter the initial configuration dialog? [Yes/no]: no // select do not enter dialog interactive configuration mode Switch> enable // enter privileged mode Switch # copy config-old.text running-config // load the previous configuration file to Destination filename [running. config]? Copy in progress... C www.2cto.com 2601 bytes copied in 0.026 secs (100038 bytes/sec) Here we can use no enable passwordno enable secrect to delete the password or change the password as required. Switch # config termial // enter the configuration mode and set the password
I. set console password> enable # configure terminal (confing) # line console 0 secure console port (config-line) # password (cisco) Secure password (config-line) # login logs must not be small. console Password settings complete exit
Ii. Set the global password enadle # configure terminal (config) # enable secret (class) login Password (config) # login global password settings complete exit
III. set the remote login (telnet) password enable www.2cto.com # config terminal (config) # line vty 0 4 (0 4 is the port) (config-line) # password (class) login Password (config-lline) # loginSwitch # copy running-config startup-config // do not forget to save the configuration and restart it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.