How to recover Admin Password on Nexus Switches

If you are unable to start a session with network-admin privileges in your Cisco Nexus switch, you must recover the network administrator password by power cycling the device. In this lesson, we will learn Nexus switch password recovery by power cycling. This processed are applicable for all NX-OS enabled devices.

nexus password recovery

The password recovery process needs to reboot the device. Hence, all traffic will disrupt for a few minutes. So, it’s recommended to take the maintenance window for recovering the password.

Another important point is, you need console connection for this procedure. Through SSH or Telnet, it’s not possible.

Advertisements

Admin Password Recovery on Nexus Switches

To do the recovery of admin password, we need to follow flowing steps.

Step 1: Establishing a terminal session on the console port of the switch and power cycle the switch. Console settings are below –

Speed— 9600 baud
Databits— 8 bits per byte
Stopbits— 1 bit
Parity— none

Step 2: Now, we need to keep pressing Ctrl-] during the boot sequence.

< --output omitted-- >
   Mod 1 2 Post Completed Successfully
   Mod 3 Post Completed Successfully
POST is completed
Checking all filesystems....r. done.
Ctrl-] 
switch(boot)#

Step 3: In this section, we will add new password for our Nexus device.

NX-OS(boot)# configure terminal
NX-OS(boot-config)# admin-password [new password]
NX-OS(boot-config)# exit
NX-OS(boot)#

Step 4: Here, we have to load nx-os. You can check your NX-OS version using dir bootflash: command.

Advertisements
NX-OS(boot)# dir bootflash:
       4096    Dec 10 16:33:40 2018  .rpmstore/
       4096    Feb 22 02:42:14 2018  .swtam/
      17856    Jul 04 04:17:32 2018  20180703_221253_poap_27599_init.log
        333    Feb 22 03:34:46 2018  license_FG5D132SVL_105.lic
       4096    Feb 22 03:12:13 2018  lost+found/
  757450240    Dec 19 01:43:45 2018  nxos.7.0.3.I7.1.bin
       4096    Feb 22 03:23:15 2018  onep/
       4096    Feb 22 02:42:47 2018  scripts/
       4096    Dec 10 16:38:14 2018  virt_strg_pool_bf_vdc_1/
       4096    Dec 10 16:37:52 2018  virtual-instance/
       4096    Dec 10 16:37:42 2018  virtual-instance-stby-sync/
        120    Dec 10 16:35:18 2018  virtual-instance.conf
       9748    Jul 21 20:28:11 2019  vlan.dat

Usage for bootflash://sup-local
 1288335360 bytes used
20577083392 bytes free
21865418752 bytes total
DH_PB_03_DC_SW_N9K_C9508_01#

In our case, it is nxos.7.0.3.I7.1.bin. Hence, we will load it using below command –

NX-OS(boot) # load bootflash:nxos.7.0.3.I7.1.bin

Step 5: Finally, login the device with newly created password and save the configuration with copy running-config startup-config command.

NX-OS(boot) #copy running-config startup-config

For additional information, you can check Cisco office page and let me know if you are facing any issue.

Leave a Comment

Your email address will not be published. Required fields are marked *

2 thoughts on “How to recover Admin Password on Nexus Switches”

  1. sir,
    i have a question
    what the device must be rebootted ?

    is there another way without having to reboot the device?
    because if you reboot, some configurations will be lost, because you haven’t done “copy running-config startup-config”

    thanks sir.

Scroll to Top