Voici les étapes à suivre lorsque l’on a perdu le mot de passe de son routeur Cisco.
- Eteindre le routeur
- Pendant la phase d’allumage, passer en mode console
- Modifier le reg de la config de 0x2102 à 0x2142
Cela bypass le fichier startup config - Reset
- Le routeur redémarre et n’utilise pas le startup-config
- Refuser l’assistant de configuration
- R>
le routeur semble vierge, la config running-config est vierge.
On rentre en mode privilégié et on active la configuration de démarrage. - On fait R# copy startup-config running-config
- On modifie le password
- On réaffecte 0x2102 au registre de configuration
Router>enable Router#enable secret sdfofmgmjgfjmlgf ^ % Invalid input detected at ‘^’ marker.Router#conf t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#enable secret sofsmlsf5 Router(config)#host TOKYO TOKYO(config)#exit TOKYO# *Mar 27 12:56:17.807: %SYS-5-CONFIG_I: Configured from console by console TOKYO#copy runn TOKYO#copy running-config star TOKYO#copy running-config startup-config Destination filename [startup-config]? Building configuration… [OK] TOKYO# |
On reload le routeur
program load complete, entry point: 0x8000f000, size: 0x1223454 Self decompressing the image : ############################################################[OK] PC = 0xbfcd0d54, Cause = 0x2000, Status Reg = 0x3040a803monitor: command « boot » aborted due to user interrupt rommon 1 > confreg 0x2142 rommon 1 > Reset |
On reload le routeur, celui-ci ne démarrera alors pas sur la startup-config
Router>enable Router#conf t Router#copy startup-config runn Router#copy startup-config running-config Destination filename [running-config]?746 bytes copied in 0.320 secs (2331 bytes/sec) TOKYO#conf t Enter configuration commands, one per line. End with CNTL/Z. TOKYO(config)#enable secret azerty TOKYO(config)#config-register 0x2102 TOKYO(config)#do write Building configuration… [OK] TOKYO(config)# |