交换机密码恢复


交换机密码恢复

CISCO交换机的密码恢复步骤和路由器的密码恢复方法差别较大,并且不同型号的交换

机恢复方法也有所差异,以下是Catalyst3560Catalyst 2950也类似)交换机的密码恢

复步骤。

1)拨掉交换机电源,按住交换机前面板的Mode键不放, 接上电源,你会看到如下提示: 

Base ethernet MAC Address:00:18:ba:11:f5:00

Xmodem file system is available.

The password-recovery mechanism is enabled.

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

    flash_init

load_helper

boot

2)输入 flash_init 命令

Initializing Flash...

flashfs[0]: 3 files, 1 directories

flashfs[0]: 0 orphaned files, 0 orphaneddirectories

flashfs[0]: Total bytes: 32514048

flashfs[0]: Bytes used: 6076928

flashfs[0]: Bytes available: 26437120

flashfs[0]: flashfs fsck took 12 seconds.

...done Initializing Flash.

Boot Sector Filesystem (bs) installed,fsid: 3

Setting console baud rate to 9600...

3)输入 load  helper 命令

4)输入 dir flash:

Directory of flash:/

2   -rwx  6073600   <date>              c3560-ipbasek9-mz.122-25.SEB4.bin

3   -rwx  1455      <date>               config.text

5   -rwx  24        <date>               private-config.text

26437120 bytes available (6076928 bytesused)

//config.text就是交换机的启动配置文件,和路由器的 startup-config类似

5)输入 rename flash:config.text flash:config.old 命令

//以上是把启动配置文件改名,这样交换机启动时就读不到config.text了,从而没有了密

码。

6)输入 boot 命令引导系统,这时就不要再按住mode键了。

7)当出现如下提示时,输入N

Continue with the configuration dialog?[yes/no] : n

8)用 enable 命令进入enable状态,并将文件config.old改回config.text,命令如

下:

rename flash:config.old flash:config.text

9)将原配置装入内存,命令如下:

Switch# copy flash:config.textsystem:running-config

10)修改各个密码:

S1#conf t

S1(config)#enable secret cisco

S1(config)#exit

11)将配置写入nvram

S1#copy running-config start-config


你可能感兴趣的:(software,available,loading,路由器,following)