Knowledge Search


×
 

[PTX] Root password recovery on PTX platforms

  [KB34980] Show Article Properties


Summary:

There may be instances when the root password needs to be recovered. This article provides step-by-step details for root password recovery on PTX platforms.

Note: This procedure is to be performed only when all super users are locked out of the system. If any super user access is available, then the root password can be recovered by using the Command Line Interface.

Solution:

Before beginning the recovery process, note the following:

  • Console access is required.

  • This procedure is specific to PTX platforms and is different from other platforms.

 

To recover the root password, perform the following steps:

  1. Power off the router by pressing the Power button on the front panel.
  2. Plug one end of the Ethernet rollover cable that is supplied with the router into the RJ-45–to–DB-9 serial port adapter that is supplied with the router.

  3. Plug the RJ-45–to–DB-9 serial port adapter into the serial port on the management device.

  4. Connect the other end of the Ethernet rollover cable to the management device (laptop or desktop).

  5. On the management device, start an asynchronous terminal emulation application (such as Microsoft Windows Hyperterminal) and select the appropriate COM port to use (for example, COM1).

  6. Configure the port settings as follows:

    • Bits per second: 9600

    • Data bits: 8

    • Parity: None

    • Stop bits: 1

    • Flow control: None 

  7. Power on the router by pressing the Power button on the front panel and verify that the power LED on the front panel is green. The terminal emulation screen on the management device displays the router’s boot sequence.

When the following prompt appears, press Ctrl-C:
BIOS drive C: is disk0
BIOS drive D: is disk1
BIOS drive E: is disk2
BIOS 639kB/3668984kB available memory

FreeBSD/x86 bootstrap loader, Revision 1.1
(builder@xxx.juniper.net, Thu Jun 14 14:21:45 PDT 2018)
[KAutoboot in 3 seconds... (press Ctrl-C to interrupt) [H[KAutoboot in 2 seconds... (press Ctrl-C to interrupt) [H[K[H[JMain Menu

Important Note: Press Ctrl-C only after the above appears on the screen.

  1. The following options appear after pressing Ctrl-C. Select option 5 for more options.
  1. Boot [J]unos volume
  2. Boot Junos volume in [S]afe mode
  3. [R]eboot
  4. [B]oot menu
  5. [M]ore options
Choice: 5
  1. When option 5 is selected, additional options will appear. Select option 2 to enter Recovery mode:

  1. Recover [J]unos volume
  2. Recovery mode - [C]LI
  3. Check [F]ile system
  4. Enable [V]erbose boot
  5. [B]oot prompt
  6. [M]ain menu
Choice: 2
Booting Junos in CLI recovery mode ...
Booting [/packages/sets/active/boot/os-kernel/kernel]...              
###########################################\n
#  Platform schema file is not available! #\n
#  Attrib_mode is mistakenly set??        #\n
#  JUNOS booting without creating Db      #\n
###########################################\n
@ 1565604994 [2019-08-12 10:16:34 UTC] mgd start
Starting MGD 

Note: Before you enter into the CLI, the system may prompt for authentication. Use root as the username and press Enter (blank password) when prompted for a password.

Starting CLI ...
root>
 
root>

Enter in to the configuration mode in CLI   
root> configure
Entering configuration mode
 
Set the root password  
[edit]
root# set system root-authentication plain-text-password
  1. At the following prompt, enter a new root password: 
New password:
Retype new password:
  1. After configuring the password, commit the configuration.
root# commit
commit complete

[edit]
root@PTX# show    compare rollback 1
[edit system root-authentication]
-   encrypted-password "$6$rTMCrhVh$eFx0m74FqNyOGh70.1u/zpaVZENZW8OK924Y6iYZI8WW3.S79toO.NYGxcsbyTK2qjZHBBiJXlojeKSNsH.Bh/"; ## SECRET-DATA
+   encrypted-password "$6$20/C2L6A$xwxsFXJVKRKPhVhJ2udtf6/sBTDi6sUs.IE4Jt61VYOtJ30jYt9CoG31k7WqGh.VuGE648EIThkBVzRFyHiM01"; ## SECRET-DATA

Note: When you configure a plain-text password, Junos OS encrypts the password for you.

[edit]
root@PTX# exit
Exiting configuration mode 
  1. At the prompt, type y to reboot the router.
root@PTX> request system reboot
Reboot the system ? [yes,no] (no) yes 
Aug 12 10:17:54 shutdown: reboot requested by root at Mon Aug 12 10:17:54 2019
Shutdown NOW!
Related Links: