Cisco Switch – How to Recover from Being Locked Out

ciscocisco-catalystcisco-commandsSecurityswitch

I have officially made the dumbest mistake ever.

My switch is a Catalyst 2960 Series, configured this way:

Current configuration : 10052 bytes
!
! Last configuration change at 19:15:28 UTC Wed Oct 26 2016 by admin
! NVRAM config last updated at 19:18:01 UTC Wed Oct 26 2016 by admin
!
version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Core
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$kCJR$njs2VC4DsqlF/vQT7X75y1
!
username admin privilege 15 secret 5 $1$bJaZ$xtF0cZGkkH5IWeOOc9hWN1
aaa new-model
!
!
aaa authentication login default local
aaa authorization exec default local if-authenticated
!
!
!
!
!
!
aaa session-id common
switch 1 provision ws-c2960x-48fps-l
!

with a username admin.

I connect to this switch via SSH, as I have no physical presence to it, and I was trying to lower the privilege level from 15 to 1 of a user account called admin in it. So, I went ahead and issued a no username admin command, then I did a username admin privilege 1 password Mypassword command, which is the same password when it was in level 15. Stupidly enough, I thought it was cool now, and I logged out. When I tried to login again, I got access denied, when using admin and Mypassword as credentials.

My aim was to lower the user privilege and have an enable password, which I did before this whole mess.

I even didn't do a save in order to restart and not have been stuck in this situation, but even with a restart I am still locked out!!

What can I do to gain access back and telnet is not enabled? I tried using the web console but it is very limited.

Best Answer

If you didn't save the configuration, you could just restart the switch, but you will need physical access to the switch. You may be able to get someone at the site to restart the switch for you. Simply unpluuging it, waiting a few minutes, then plugging it back in should work.

Also, Cisco maintains a Password Recovery Procedures web page with links to the various device recovery procedures, but you are going to need physical access to the switch to perform the recovery procedures.