Support Support Downloads Knowledge Base Apex 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

[CTP] Password recovery for release 9.x or higher



Article ID: KB36265 KB Last Updated: 20 Oct 2020Version: 1.0

This article provides the steps required to reset CTP shell user login passwords from single user mode.


Unable to login to the CTP shell (console or SSH) due to a bad password or cannot recall the password.


The steps required to reset shell user passwords change from time to time when software updates occur.  In this case, the kernel has changed to Wind River in the 9.x CTPOS release(s). 

Take the following steps to reset the root or other shell user passwords if your CTP is running 9.0R1 or higher releases.

Note: Console access is required to boot/reboot the CTP node. Before performing the following steps, obtain local console access or access through a terminal server to reset the CTP root password or other user passwords.
  1. Power up the CTP (150,151 2008, 2024, 2056).  

  2. When the GRUB Loader is displayed, press 'e' to enter edit mode.

     |setparams 'CTPOS WRLv7 '                                                       |
     |                                                                               |
     |        search --no-floppy --label --set=root CTP_ROOT                         |
     |        linux        /boot/vmlinuz root=LABEL=CTP_ROOT console=ttyS0,9600n8\   |
     | nodmraid intel_iommu=off                                                      |
     |        initrd        /boot/WR_Linux_initrd-v02.cpio.gz                        |
     |                                                                               |
     |                                                                               |
     |                                                                               |
  3. Press the down arrow to get to the line starting with “linux” (3 down arrows)

  4. Press the right arrow key to navigate to the end of that line (ends with ‘iommu=off’), then press the space bar and type “init=/bin/bash”

    Example output:

    bash-4.3# /bin/mount LABEL=CTP_ROOT /flash_root
    bash-4.3# passwd
    Changing password for user root.
    New password:
    Retype new password:
    passwd: passwd: password updated successfully
    bash-4.3# cp /etc/shadow /flash_root/etc/shadow
    bash-4.3# /bin/umount /flash_root
    bash-4.3# /sbin/reboot -f
  5. Enter Ctrl X to boot into single user mode.

  6. CTP should boot to the bash-4.3# prompt

  7. Enter ‘/bin/mount LABEL=CTP_ROOT /flash_root’ to mount the flash_root directory.

  8. Enter  '/usr/bin/passwd' and enter the new root password.  The msg, 'passwd: password updated successfully', should display.

  9. Enter ‘cp /etc/shadow /flash_root/etc/shadow’ to copy the shadow file to the flash.

  10. Enter ‘/bin/umount /flash_root’ to unmount the flash_root directory.

  11. Enter ‘/sbin/reboot –f’ to reboot the CTP.

  12. When the CTP has finished rebooting, login to verify that the change is successful.

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