Cisco
Recover the network-admin password on Nexus switches via the loader> prompt. This procedure boots a recovery image over TFTP and reinitialises the system.
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.
Before proceeding with password recovery, ensure you have a console cable, terminal emulation software configured to 9600 baud, and physical access to the device.
Connect your terminal cable to the console port of the device and open your serial terminal session.
Power cycle the hardware and issue a Break key sequence during initial system startup to enter ROMMON mode.
Bypass startup configuration loading, boot into system software, set your new credentials, and save changes back to non-volatile memory.
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.
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.
loader> set ip 172.21.55.213 255.255.255.224loader> set gw 172.21.55.193switch(boot)# prompt:loader> cmdline recoverymode=1loader> boot tftp://172.28.255.18/tftpboot/n9000-dk9.6.1.2.I1.1.binswitch(boot)# prompt confirms a usable image.switch(boot)# init systemswitch(boot)# reload-nxosThe 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.