Hi Rohit,
PFB the document to recover the root password:
1.Power off the device by pressing the power button on the front panel and reboot the device.
2.Turn on the power to the management device.
3.Power on the device by pressing the power button on the front panel. Verify that the POWER LED on the front panel turns green.The terminal emulation screen on your management device displays the device’s boot sequence.
4.When the following prompt appears, press the spacebar to access the router’s bootstrap loader and type in the following commands:
Hit [Enter] to boot immediately, or space bar for command prompt.
Booting [kernel] in 9 seconds...
Loader>
Loader> watchdog disable
Loader> boot –s
5.At the following prompt, enter recovery to start the root password recovery procedure.
Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh: recovery
6.Enter configuration mode in the CLI.
7.Set the root password. For example:
user@host# set system root-authentication plain-text-password
For more information about configuring the root password, see the Junos System Basics Configuration Guide.
8.At the following prompt, enter the new root password. For example:
New password: juniper1
Retype new password:10.At the second prompt, reenter the new root password.
9.If you are finished configuring the network, commit the configuration.
root@host# commit
commit complete12.Exit configuration mode in the CLI.
10.Exit operational mode in the CLI.
11.At the prompt, enter y to reboot the device.
Reboot the system? [y/n] y
10.Press the spacebar once again, to access the router’s bootstrap loader prompt, when the following sequence appears on the console:
Hit [Enter] to boot immediately, or space bar for command prompt.
Booting [kernel] in 9 seconds...
Loader>
Loader> watchdog enable
Loader> boot
11.The device will boot again and at this instance will ask for a user name and password. Enter the newly configured password.
Hope this helps.
Regards,
Visitor
-------------------------------------------------------------------------------------------------------
If this post was helpful, please mark this post as an "Accepted Solution".Kudos are always appreciated!