How to reset lost root password in Juniper EX Series Switch
How to reset lost root password in Juniper EX Series Switch
It would be one of most extremely important experience to all who work with Juniper when one comes to set up either lost or forgotten password in Juniper EX Series Switches. Here, I am going to show the process for How to reset lost root password in Juniper EX Series Switch. The lost password can only be reset and recovered with console access of Switch. So, before going to actual activity, console cable is mandatory.
And the same process can be follow for the SRX and J Series devicess as well.
Firstly I am going to describe steps and then show details log of reset/recovering root password.
Follow the steps to rest lost root password in Juniper EX Series Switch
- Connect the console cable from management system to Switch console port
- Use the terminal emulation application such as TERA TERM, PuTTY, and Microsoft Windows HyperTerminal.
- Configure the Serial port (COM) settings as below:
Bits per second: 9600
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None
- Power on the switch
- Concentrate to the following console prompt output when it 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…
- Then following prompt appears and type boot -s and enter to start up the system in single-user mode:
loader> boot -s - Now wait some little bit seconds and the following prompt appears where type recovery and enter to start the root password recovery procedure:
Enter full path name of shell or ‘recovery’ for root password recovery or RETURN for /bin/sh: recovery - Now there will be consistency checking, mounting of file systems and initialization and after that following CLI prompt appears.
- Go to configuration mode by typing configure and set the root password with following command and enter to type the password as below;
- It prompts as blow to type new password. Enter the new password and press enter. Once gain it prompt to retype new password.
- Now save the Config with commit command and exit from configuration mode. Finally on exiting form Switch, it prompts to reboot the system as below and type y to reboot the system.
U-Boot 1.1.6 (Feb 6 2008 – 11:27:42) Board: EX3200-24T 2.15 EPLD: Version 6.0 (0x85) DRAM: Initializing (512 MB) FLASH: 8 MB USB: scanning bus for devices… 2 USB Device(s) found scanning bus for storage devices… 1 Storage Device(s) found Consoles: U-Boot console Found compatible API, ver. 7 FreeBSD/PowerPC U-Boot bootstrap loader, Revision 2.1 (marcelm@apg-bbuild01.juniper.net, Wed Feb 6 11:23:55 PST 2008) Memory: 512MB Loading /boot/defaults/loader.conf /kernel data=0x8f8cbc+0xaad64 syms=[0x4+0x7bc30+0x4+0xb024e] Hit [Enter] to boot immediately, or space bar for command prompt. Booting [/kernel] in 1 second… Type ‘?’ for a list of commands, ‘help’ for more detailed help. loader> boot -s Kernel entry at 0x800000e0 … GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1996-2012, Juniper Networks, Inc. All rights reserved. Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. JUNOS 10.4R9.2 #0: 2012-02-02 07:48:00 UTC builder@warth.juniper.net:/volume/build/junos/10.4/release/10.4R9.2/obj-powerpc/bsd/sys/compile/JUNIPER-EX Timecounter “decrementer” frequency 37500000 Hz quality 0 cpu0: Freescale e500v2 core revision 2.2 cpu0: HID0 80004080<EMCP,TBEN,EN_MAS7_UPDATE> real memory = 511705088 (488 MB) avail memory = 500256768 (477 MB) ETHERNET SOCKET BRIDGE initialising Initializing EXSERIES platform properties … nexus0: <PPC e500 Nexus device> ocpbus0: <on-chip peripheral bus> on nexus0 openpic0: <OpenPIC in on-chip peripheral bus> iomem 0xfef40000-0xfef600b3 on ocpbus0 memctl0: <mpc85xx memory error reporting> iomem 0xfef20000-0xfef20e5b,0xfef02000-0xfef02e5b irq 32,34 on ocpbus0 ECC not enabled to report errors 0xc3000000 device_attach: memctl0 attach returned 6 i2c0: <MPC85XX OnChip i2c Controller> iomem 0xfef03000-0xfef03014 irq 59 on ocpbus0 i2c1: <MPC85XX OnChip i2c Controller> iomem 0xfef03100-0xfef03114 irq 59 on ocpbus0 uart0: <16550 or compatible> iomem 0xfef04500-0xfef0450f irq 58 on ocpbus0 uart0: console (9600,n,8,1) uart1: <16550 or compatible> iomem 0xfef04600-0xfef0460f irq 58 on ocpbus0 lbc0: <Freescale 8533 Local Bus Controller> iomem 0xfef05000-0xfef05fff,0xff000000-0xffffffff irq 22 on ocpbus0 cfi0: <AMD/Fujitsu – 8MB> iomem 0xff800000-0xffffffff on lbc0 syspld0 iomem 0xff000000-0xff00ffff on lbc0 tsec0: <eTSEC ethernet controller> iomem 0xfef24000-0xfef24fff irq 45,46,50 on ocpbus0 tsec0: hardware MAC address 00:23:9c:18:19:ff miibus0: <MII bus> on tsec0 e1000phy0: <Marvell 88E1112 Gigabit PHY> on miibus0 e1000phy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX-FDX, auto pcib0: <Freescale MPC8544 PCI host controller> iomem 0xfef08000-0xfef08fff,0xf0000000-0xf3ffffff on ocpbus0 pci0: <PCI bus> on pcib0 pci0: <serial bus, USB> at device 18.0 (no driver attached) ehci0: <Philips ISP156x USB 2.0 controller> mem 0xf0001000-0xf00010ff irq 22 at device 18.2 on pci0 usb0: EHCI version 1.0 usb0: <Philips ISP156x USB 2.0 controller> on ehci0 usb0: USB revision 2.0 uhub0: Philips EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub0: 2 ports with 2 removable, self powered umass0: STMicroelectronics ST72682 High Speed Mode, rev 2.00/2.10, addr 2 pcib1: <Freescale MPC8544 PCI Express host controller> iomem 0xfef0a000-0xfef0afff,0xe0000000-0xe3ffffff,0xec000000-0xec0fffff irq 42 on ocpbus0 pci1: <PCI bus> on pcib1 pcib2: <PCI-PCI bridge> at device 0.0 on pci1 pci2: <PCI bus> on pcib2 mpfe0: <Juniper EX-series Packet Forwarding Engine> mem 0xa4000000-0xa40fffff,0xa0000000-0xa3ffffff irq 18 at device 0.0 on pci2 idma0: <mp85xxx DMA Controller> iomem 0xfef21000-0xfef21300 irq 36 on ocpbus0 Initializing product: 36 .. bmeb: bmeb_lib_init done 0x81ee2000, addr 0x808fb37c bme0:Virtual BME driver initializing Timecounters tick every 1.000 msec Loading the NETPFE picpeer module IPsec: Initialized Security Association Processing. da0 at umass-sim0 bus 0 target 0 lun 0 da0: <ST ST72682 2.10> Removable Direct Access SCSI-2 device da0: 40.000MB/s transfers da0: 1000MB (2048000 512 byte sectors: 64H 32S/T 1000C) Trying to mount root from ufs:/dev/da0s1a Attaching /packages/jbase via /dev/mdctl… Mounted jbase package on /dev/md0… System watchdog timer disabled Enter full pathname of shell or ‘recovery’ for root password recovery or RETURN for /bin/sh: recovery Performing filesystem consistency checks … /dev/da0s1a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/da0s1a: clean, 24457 free (41 frags, 3052 blocks, 0.0% fragmentation) /dev/da0s4d: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/da0s4d: clean, 31588 free (44 frags, 3943 blocks, 0.1% fragmentation) /dev/da0s3e: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/da0s3e: clean, 61507 free (179 frags, 7666 blocks, 0.3% fragmentation) /dev/da0s3d: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/da0s3d: clean, 188830 free (22 frags, 23601 blocks, 0.0% fragmentation) Performing mount of main filesystems … Verified manifest signed by PackageProduction_10_4_0 Verified jboot signed by PackageProduction_10_4_0 Verified jbase-10.4R9.2 signed by PackageProduction_10_4_0 Mounted jcrypto-ex package on /dev/md3… Verified manifest signed by PackageProduction_10_4_0 Verified jcrypto-ex-10.4R9.2 signed by PackageProduction_10_4_0 Mounted jdocs-ex package on /dev/md4… Verified manifest signed by PackageProduction_10_4_0 Verified jdocs-ex-10.4R9.2 signed by PackageProduction_10_4_0 Mounted jkernel-ex package on /dev/md5… Verified manifest signed by PackageProduction_10_4_0 Verified jkernel-ex-10.4R9.2 signed by PackageProduction_10_4_0 Mounted jpfe-ex42x package on /dev/md6… Verified manifest signed by PackageProduction_10_4_0 Verified jpfe-ex42x-10.4R9.2 signed by PackageProduction_10_4_0 Mounted jroute-ex package on /dev/md7… Verified manifest signed by PackageProduction_10_4_0 Verified jroute-ex-10.4R9.2 signed by PackageProduction_10_4_0 Mounted jswitch-ex package on /dev/md8… Verified manifest signed by PackageProduction_10_4_0 Verified jswitch-ex-10.4R9.2 signed by PackageProduction_10_4_0 Mounted jweb-ex package on /dev/md9… Verified manifest signed by PackageProduction_10_4_0 Verified jweb-ex-10.4R9.2 signed by PackageProduction_10_4_0 Executing /packages/mnt/jweb-ex-10.4R9.2/mount.post.. Creating configuration….. Loading configuration … mgd: commit complete machdep.bootsuccess: 0 -> 0 Performing initialization of management services … Performing checkout of management services … NOTE: Once in the CLI, you will need to enter configuration mode using NOTE: the ‘configure’ command to make any required changes. For example, NOTE: to reset the root password, type: NOTE: configure NOTE: set system root-authentication plain-text-password NOTE: (enter the new password when asked) NOTE: commit NOTE: exit NOTE: exit NOTE: When you exit the CLI, you will be asked if you want to reboot NOTE: the system Starting CLI … root@EX3200-Switch> configure Entering configuration mode [edit] root@EX3200-Switch# set system root-authentication plain-text-password New password: Retype new password: [edit] root@EX3200-Switch# commit commit complete [edit] root@EX3200-Switch# [edit] root@EX3200-Switch# exit Exiting configuration mode root@EX3200-Switch> exit Reboot the system? [y/n] y |