Ubiquiti

Ubiquiti EdgeRouter 12P Password Recovery

Step-by-step password recovery for the Ubiquiti EdgeRouter 12P (EdgeRouter (EdgeOS)). Console access required.

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 procedure recovers administrator access to the Ubiquiti EdgeRouter 12P (Ubiquiti EdgeRouter/EdgeSwitch running EdgeOS) when the admin password is lost. EdgeOS devices can be recovered via the reset button (factory reset) or via U-Boot single-user boot (config-preserving password reset).

Prerequisites

Console cable (EdgeRouter X/4/6P/8/12 use RJ-45 console on some models; EdgeRouter Pro and EdgeSwitch use RJ-45 console) with a terminal session at 115200 baud, 8N1 (EdgeRouter X/4/12 use 115200; EdgeRouter Pro-8 uses 115200 too). Physical access for the reset button.

Recovery Procedure — U-Boot Single-User (config preserved)

  1. Connect the console cable (115200 8N1) and power-cycle the device.
  2. When the U-Boot banner appears, press a key to interrupt autoboot at the ubnt> (or U-Boot>) prompt.
  3. Boot into single-user mode: boot -s (on most EdgeRouter models; if -s is not supported, set bootargs to include single: setenv bootargs console=ttyS0,115200 single then boot).
  4. The device boots to a root shell prompt (single-user).
  5. Mount the root filesystem read-write: mount -o remount,rw /
  6. Reset the admin password: passwd ubnt (the default user) or passwd root, entering the new password.
  7. Reboot: reboot. Log in with the new password.

Recovery Procedure — Reset Button (factory reset, destructive)

  1. Power off the device.
  2. Press and hold the Reset button (pinhole on most EdgeRouter models).
  3. Power on while holding Reset; hold for 10 seconds (or until the LED pattern changes), then release.
  4. The device boots to factory defaults. Log in via console or web as ubnt / ubnt.
  5. Restore your configuration from a backup: System → Backup in the web UI, or load the config from the CLI if you have a config.boot backup.

Important Notes

Protecting Your Configuration

Before recovery, back up the config: System → Backup in the web UI, or save from the CLI (saves config.boot). After recovery, verify the config loads and re-save.