Recovering the Root Password in JUNOS
A lot of the network articles here will show us configuring second hand devices bought on eBay. Experience tells us that a lot of these will come with the former owner’s login information still on the device, effectively turning them into large paperweights if you don’t know their credentials.
In this article, we will go through how to resolve this issue on JUNOS, the operating system Juniper install on their networking hardware. Fortunately, Juniper has provided us with a fairly simplistic way to reset their devices root account password meaning we will be logged on in no time.
- A computer with a terminal emulator installed (Putty for Windows/MacOS or Minicom for Linux)
- A serial cable (either an RS-232 or a USB to Console)
- Physical access to the device
- Turn on the Juniper device.
- Give the Juniper device a few minutes to power on.
- Turn on the computer.
- Plug the serial cable into the laptop and the device’s console port.
- Open the terminal emulator.
- Establish a serial connection.
- Hit the return key.
- Press and hold the device’s power button before releasing after 15 seconds.
- Immediately begin tapping the space bar.
- At the => prompt enter the command:
- Immediately begin tapping the space bar again.
- At the loader> prompt enter the command:
- boot -s
- When the message Enter full pathname of shell or ‘recovery’ for root password recovery or RETURN appears, enter the command:
- Enter configuration mode and reset the root password by entering the following commands:
- set system root-authentication plain-text-password
- Enter your new root password.
- Re-enter the new password when prompted.
- Save the changes and log out of the device using the following commands:
- commit and-quit
- Log back into the device as the root user with your new password.
Having followed these quick steps you should be logged onto the device. You may want to