Supported Platforms
Related Documentation
- ACX, M, MX, PTX, T Series
- For information about configuring an encrypted root password, configuring SSH keys to authenticate root logins, and configuring special requirements for plain-text passwords, see Configuring the Root Password.
- EX Series
- Connecting and Configuring an EX Series Switch (CLI Procedure)
- Connecting and Configuring an EX Series Switch (J-Web Procedure)
Troubleshooting Loss of the Root Password
Problem
If you forget the root password for a switch, use the password recovery procedure to reset the root password.
![]() | Note: You need physical access to the switch to recover the root password. |
![]() | Tip: For a video on recovering the root password for routers, see Recovering the Root Password. The procedure is similar for switches. |
Solution
To recover the root password:
- Power off your switch by unplugging the power cord or turning off the power at the wall switch.
- Insert one end of the Ethernet cable into the serial port
on the management device and connect the other end to the console
port on the back of the switch. See Figure 1.
Figure 1: Connecting to the Console Port on the EX Series Switch
- On the management device, start your asynchronous terminal emulation application (such as Microsoft Windows Hyperterminal) and select the appropriate COM port to use (for example, COM1).
- Configure the port settings as follows:
- Bits per second: 9600
- Data bits: 8
- Parity: None
- Stop bits: 1
- Flow control: None
- Power on your switch by plugging in the power cord or turning on the power at the wall switch.
- When the following prompt appears, press the Spacebar
to access the switch's bootstrap loader command prompt:
Hit [Enter] to boot immediately, or space bar for command prompt. Booting [kernel] in 1 second...
Note: If the switch is in unattended mode for U-Boot, access to the bootstrap loader command prompt is blocked. If the root password is lost, you must reset the switch to the factory default configuration using the LCD panel. For more information, see Reverting to the Default Factory Configuration for the EX Series Switch.
- At the following prompt, type boot -s to start
up the system in single-user mode:
loader> boot -s - At the following prompt, type recovery to start
the root password recovery procedure:
Enter full path name of shell or ’recovery’ for root password recovery or RETURN for /bin/sh: recoveryA series of messages describe consistency checks, mounting of filesystems, and initialization and checkout of management services. Then the CLI prompt appears.
- Enter configuration mode in the CLI:
user@switch> configure - Set the root password. For example:
user@switch# set system root-authentication plain-text-password - At the following prompt, enter the new root password.
For example, juniper1:
user@switch# juniper1Retype new password:
- At the second prompt, reenter the new root password.
- If you are finished configuring the network, commit the
configuration.
root@switch# commitcommit complete
- Exit configuration mode in the CLI.
root@switch# exit - Exit operational mode in the CLI.
root@switch> exit - At the prompt, enter y to reboot the switch.
Reboot the system? [y/n] y
Related Documentation
- ACX, M, MX, PTX, T Series
- For information about configuring an encrypted root password, configuring SSH keys to authenticate root logins, and configuring special requirements for plain-text passwords, see Configuring the Root Password.
- EX Series
- Connecting and Configuring an EX Series Switch (CLI Procedure)
- Connecting and Configuring an EX Series Switch (J-Web Procedure)
Published: 2014-04-24
Supported Platforms
Related Documentation
- ACX, M, MX, PTX, T Series
- For information about configuring an encrypted root password, configuring SSH keys to authenticate root logins, and configuring special requirements for plain-text passwords, see Configuring the Root Password.
- EX Series
- Connecting and Configuring an EX Series Switch (CLI Procedure)
- Connecting and Configuring an EX Series Switch (J-Web Procedure)