Switching

 View Only
last person joined: 23 hours ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  EX4300 root password recovery

    Posted 05-20-2014 12:07

    Hello,

     

    I am trying to reser root password from a EX4300 but I facing the following problems:

     

    - When I try by LCD display, nothing happens

    - When I try CLI recovery, I get the following situation:

     

    loader > boot -s

     

    then i have  write reconvery as documents. then i have found some errors as below.. 

    ==============================================

    Starting CLI ...
    invalid user: getpwuid failsCLI invocation failed
    Continue, Abort, or Start Shell? ([c],a,s)

    ==============================================

     

     

    Does anybody can help?



  • 2.  RE: EX4300 root password recovery

     
    Posted 05-20-2014 12:28

    You would have to do an USB installation with format option to recover from this problem.

     

    Nothing else will work.

     

     

    =====

    If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.



  • 3.  RE: EX4300 root password recovery

    Posted 05-22-2014 12:55

    Thank you for the reply guys. Do you have a documentation about the USB format procedure? I tried to search about that but didn´t find.

    The strange situation is that I just opened the Juniper Box and started to configure.

    I have 2 pairs of 2 4300 in Virtual Chassis. On one side, the configuration was easy, but on the other pair of Virtual Chassis that happened. I remove the QSFP cable of the module 1 (The problem switch, module 0 is OK) and try to console it, but I found this problem.

    Apparently the EX4300 already came with this root password locked.



  • 4.  RE: EX4300 root password recovery

    Posted 22 days ago
    Edited by Jodi Meier 22 days ago

    For the USB procedure?

    http://kb.juniper.net/InfoCenter/index?page=content&id=KB10800&smlogin=true

    KB Article KB20551 - Installing Junos OS on an EX switch (where Junos OS is copied to the EX switch) Note: Link to KB Article updated on 05/29/2024

    If you have another super user account you run the same command to set teh password for the root account:

    #set system root-authentication plaintext-password

    password:

    reenter password:



  • 5.  RE: EX4300 root password recovery

    Posted 05-22-2014 13:22

    But the problem on that procedure is that I need to authenticate on the switch to perform these commands.

    I don´t need the configuration on this switch, I just need to access it. The two options is OK for me

     

    1) root password recovery

    2) reset to factory default

     

    But I can´t perform any



  • 6.  RE: EX4300 root password recovery

    Posted 05-22-2014 13:36

    Format the usb on any aother switch and copy the install file as indicated. Plug in the uSB to the EX Switch and reboot it. The bootup process will boot from the USB first.

    Are you saying that when you press the reset button for about 15 seconds it does not work? if the answer is yes and the USB does not work for you, maybe a ticket with JTAC is order. Actually their is another method which I intend to try in a few weeks on a couple of devices. Take out the CF card from the affected switch, and put it in a USB cf reader. plug it in another switch and use the "request system snapshot media" to install the image on the card, then replace it.

    If none works then you can use the procedure to install from tftp. that is well documented.

    Try this one more time:

     

    ****Must have a console connection****
    1.Reboot the system- Do not hit the spacebar at the first prompt!!
    2.Look for “Loading /boot/defaults/loader.conf” then •Press the Spacebar immediately (if you wait for the prompt- it may be too late)
    •loader> (if you set the environment you reinstall using tftp from this command)
    •loader> boot –s (to access single user mode)
    3.Enter recovery when prompted to go into recovery mode

    /bin/sh: recovery

    4.Enter “edit”  and  >Set root password

    set system root-authentication plain-text-password

    5.Commit the change and exit configuration mode—reboot


  • 7.  RE: EX4300 root password recovery

     
    Posted 05-23-2014 05:07

    So what happened? Were you able to install the Junos with --format?

     

    You should be able to do this as you have access to loader.



  • 8.  RE: EX4300 root password recovery

    Posted 08-05-2014 05:06

    I'm having the exact some problem here. Would love to hear what the resolution was. Not sure if its related but I also had the stack cables connected to another switch but removed them. The password recovery does not work we get that error invalid user: getpwuid failsCLI invocation failed. Its like root was removed somehow. 

     



  • 9.  RE: EX4300 root password recovery

    Posted 05-20-2014 18:56

    Did you create another super-user account. If yes, you can use that account to reset the root password.  If no, then looks like you do not have much choice.

    One other worst case scenario is the you hopefuly have your config backed elsewhere off the device. Or if you do have another account that you can get into and save the config (only save minus the root password config), then reset to factory defaults which will prompt you for login and you can then load the save config file using the load merge option.

    If you press reset button for 15sec, watch the status LED turn amber color. After that when you access the console, it should prompt for user name, enter root and you should get loged so you can enter new password then load your saved config.

     



  • 10.  RE: EX4300 root password recovery

    Posted 03-06-2015 00:33

    I had exactly the same problem on ex4300. The cause was that password files were not created properly. I followed this procedure: http://kb.juniper.net/InfoCenter/index?page=content&id=KB29113&actp=RSS&smlogin=true

     

    1. Get into "single user mode" during the boot cycle by first getting to the loader prompt.

    loader> boot -s

    2. Check and mount the /var file system.

    # df
    Filesystem 512-blocks Used Avail Capacity Mounted on
    /dev/da0s1a 647748 349172 246760 59% /
    devfs 2 2 0 100% /dev
    /dev/md0 436012 436012 0 100% /packages/mnt/junos


    # mount /dev/da0s3e /var
    WARNING: /var was not properly dismounted

    # df
    Filesystem 512-blocks Used Avail Capacity Mounted on
    /dev/da0s1a 647748 349172 246760 59% /
    devfs 2 2 0 100% /dev
    /dev/md0 436012 436012 0 100% /packages/mnt/junos
    /dev/da0s3e 347504 13932 305772 4% /var <===da0s3e mounted


    3. Check the password files in the root directory.

    # ls -lrt /var/etcroot

    4. Create read-write access to the root partition and create the symbolic links to the password files.

    # mount -uw /

    # ln -s /var/etcroot/spwd.db /etc/spwd.db

    # ln -s /var/etcroot/pwd.db /etc/pwd.db


    5. Unmount the /var partition.

    # cd /

    # umount /var

    # df
    Filesystem 512-blocks Used Avail Capacity Mounted on
    /dev/da0s1a 647748 349172 246760 59% /
    devfs 2 2 0 100% /dev
    /dev/md0 436012 436012 0 100% /packages/mnt/junos

    # exit


    6. This will boot the EX4300 into amnesiac mode. Log into the device using the login 'root'