Support Support Downloads Knowledge Base Juniper Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[vSRX] Root password recovery in KVM environment



Article ID: KB31790 KB Last Updated: 03 Jun 2017Version: 1.0

This article describes how to recover root password in vSRX within kernel-based virtual machine (KVM) environment.

Steps to recover the root password in KVM environment:
  1. Reboot the vSRX instance using virsh utility:   virsh reboot {domain-id or domain-name}

  2. Immediately try login to the same instance using domain-name because domain-id may change after the reboot :  virsh console domain-name

  3. After login, you will see a prompt like Escape character is ^] . Press enter a couple of times and you will see the boot process.

  4. Let it boot until wind river Linux and the time you see the following prompt:

    Hit [Enter] to boot immediately, or space bar for command prompt. Booting [kernel] in 9 seconds...

  5. Press the space bar and break to boot sequence. Then type boot -s to login to single user mode:


  6. At the following prompt, type 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

  7. Once this script ends, you will be in vSRX operational mode.

  8. Change to configuration mode using edit or config command.

  9. Set a new password  as :  set system root-authentication plain-text-password

    New password:  <-- Configure password here and confirm in next step.

  10. Commit the change and enter: commit

  11. Exit from config mode and reboot the vSRX:
          > request system reboot
             Reboot the system? [y/n] y

  12. Now, you should be able to login with the new password.

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search