Ciscoルータでログインパスワードを忘れてしまった場合や、ヤフオクなどで購入したルータにパスワードが設定されていて、ログイン出来ない、なんて時はパスワードリカバリをすることになるわけですが、そのパスワードリカバリを無効にする隠しコマンドがあるようです。
No Service Password-Recovery - Cisco Systems
http://www.cisco.com/en/US/docs/ios/12_3/12_3y/12_3ya8/gtnsvpwd.html
コマンドは以下な感じ。
R1(config)# no service password-recovery
WARNING:
Executing this command will disable password recovery mechanism.
Do not execute this command without another plan for password recovery.
Are you sure you want to continue? [yes/no]: y
R1(config)#
実機で試してみたところ、「no service password-recovery」コマンドを投入してReloadしてみると、Breakキーをいくら連打しても、Rommonへ落ちてくれませんでした。
Router#conf t
Router(config)#no service password-recovery
WARNING:
Executing this command will disable password recovery mechanism.
Do not execute this command without another plan for
password recovery.Are you sure you want to continue? [yes/no]: y
Router(config)#^Z
Router#
Router#
Router#wr
Building configuration...
[OK]
Router#sh
Router#show run
Router#show running-config
Building configuration...Current configuration : 553 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
no service password-recovery
!
hostname Router
!
boot-start-marker
boot-end-marker
!
enable password cisco
!
no aaa new-model
memory-size iomem 10
ip cef
!
!
!
!Router#
Proceed with reload? [confirm]System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
C2600 platform with 65536 Kbytes of main memoryPASSWORD RECOVERY FUNCTIONALITY IS DISABLED
PC = 0xfff14df8, Vector = 0x500, SP = 0x80004374
program load complete, entry point: 0x80008000, size: 0xcfbc98
Self decompressing the image : #################
########################
「no service password-recovery」コマンドを投入すると、ルータ再起動時のメッセージに、「PASSWORD RECOVERY FUNCTIONALITY IS DISABLED」というメッセージが表示されます。
ちょっと怖い
この設定って、ちょっと怖いですね。
悪意のあるユーザーが故意に設定してしまうなんてこともありえますしね。
たしかに
たしかに、一つ間違えればルータハイジャックにもなりうるわけで、かなり危険ですよね。
パスワードリカバリを無効にするコマンドを設定したルータのパスワードリカバリ方法とかも実は用意されてたりするのでしょうかね。