Juniper

Juniper EX / QFX Root Password Recovery

Recover the Junos root password by booting into single-user mode and setting a new root password from the CLI.

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

Junos devices are recovered by interrupting the boot loader and entering single-user mode, where the root account can be reset without a password.

Prerequisites

Recovery Steps

  1. Connect the console and reboot the device.
  2. When the boot menu appears, press a key to interrupt and reach the loader> prompt.
  3. At the loader prompt select Boot to single user mode (option 6, or boot with -s depending on platform).
  4. The device boots to a root@% shell without prompting for a password.
  5. Enter the CLI and set a new password:
    root@% cli
    root> configure
    # set system root-authentication plain-text-password
    New password: <new-password>
  6. Commit, then reboot normally:
    # commit
    # run reboot

Note

On EX switches the recovery menu is reachable through the Menu option in the boot loader. The device need not be reset to factory defaults.