Cisco

Cisco Nexus NX-OS Password Recovery

Recover the network-admin password on Nexus switches via the loader> prompt. This procedure boots a recovery image over TFTP and reinitialises the system.

Overview

This guide provides step-by-step instructions for resetting lost or forgotten administrative passwords on enterprise networking hardware. Follow the procedure below carefully to regain access while preserving your device configuration.

Prerequisites

Before proceeding with password recovery, ensure you have a console cable, terminal emulation software configured to 9600 baud, and physical access to the device.

Step 1: Establish Console Connection

Connect your terminal cable to the console port of the device and open your serial terminal session.

Step 2: Interrupt the Boot Sequence

Power cycle the hardware and issue a Break key sequence during initial system startup to enter ROMMON mode.

Step 3: Reset Password & Configuration

Bypass startup configuration loading, boot into system software, set your new credentials, and save changes back to non-volatile memory.

Overview

This document follows Cisco's published Password Recovery Procedure for Cisco NX-OS. Recovery is performed from the loader> prompt by booting an NX-OS image with recoverymode=1, which lands you at the switch(boot)# prompt.

Prerequisites

Reaching the loader> prompt

Reload the switch. When the following appears, press Ctrl-C to abort the image boot:

Booting nx-os image: bootflash:/n9000-dk9.x.x.x.bin....(----> Press Ctrl + C)

You will see Aborting Image Boot followed by GRUB and the loader> prompt.

Recovery Steps

  1. Specify the local IP address and subnet mask:
    loader> set ip 172.21.55.213 255.255.255.224
  2. Specify the default gateway:
    loader> set gw 172.21.55.193
  3. Configure the boot process to stop at the switch(boot)# prompt:
    loader> cmdline recoverymode=1
  4. Boot the NX-OS image from your TFTP server:
    loader> boot tftp://172.28.255.18/tftpboot/n9000-dk9.6.1.2.I1.1.bin
    The switch(boot)# prompt confirms a usable image.
  5. Enter the NX-OS system. Caution: this command reformats the file system — back up first.
    switch(boot)# init system
  6. Complete the reload:
    switch(boot)# reload-nxos

Notes

The loader> prompt differs from switch# or switch(boot)#. Command completion does not work there, so type commands exactly. Use help to list available loader commands. If booting over TFTP you must supply the full path to the image.

Source: Cisco, Password Recovery Procedure for Cisco NX-OS.