Description

 

By default, the Admin account is used to access the CLI of Junos Space. When the password is forgotten, this procedure can be used to define a new password.

This KB article describes how to reset the Admin password on the Junos Space Virtual device. It includes the steps required for Junos Space 24.1R1 and above versions.

Symptoms

 

Lost admin password or user is unable to login with admin user password.

Solution

Quick Reference: 

See the screenshot example below for more details if needed

Note: Your console window should remain 80x24 , the default size. Do NOT resize the window for best results.

  1. Reboot the Junos Space system, with console connection open
    • Virtual: from the VMware controls
    • ​Physical: powercycle system
  1. When GRUB boot menu is displayed, Press “ ” to edit the selected entry
  2. If a username and password is requested enter:  root/abc123
  3. Locate the line that starts with " linux ", and Append "rd.break enforcing=0" at the end of the kernel line. After you have accessed the grub editor’s shell, scroll down until it begins with “Linux.” Using your forward arrow key, navigate to the end of the line and add the line to the directive.
  4. If Virtual System, remove any occurrences of "console=XXX" or else the system will display to a nonexistent serial console instead of the virtual monitor port. Example: console=tty1 console=ttys0,9600n8  
  5. Space 24.1R1 and Later release : Press  Ctrl+x  to boot.
  6. To reset the root password, you need access to the /sysroot directory with read and write permissions. To mount the/sysroot directory with the read and write permissions, enter the command example: # mount -o rw,remount /sysroot
  7. Note: Make sure to take note of the space between the mount and -o and between the remount and /.
  8. In the next step, change the directory environment to /sysroot example: # chroot /sysroot
  9. If you want to reset the admin password, type the command below. You will have to provide a new password and reset it later. Example: # passwd admin
  10. Come back to Switch root prompt using exit and Reboot the system using "reboot" command

Example with Screenshots

Note: Your console window should remain 80x24 , the default size. Do NOT resize the window for best results.

  1. Reboot the system
  2. When GRUB boot menu is displayed, Press “e”.

    Example: 24.1R1 and Later

 

3. For 24.1R1 and later enter the default grub protection username and password: root/abc123

 

4. Reach the edit screen. Locate the line that starts with " linux ", and Append "rd.break enforcing=0" at the end of the kernel line. After you have accessed the grub editor’s shell, scroll down until it begins with “Linux.” Using your forward arrow key, navigate to the end of the line and add the line to the directive.

 

Example: If Virtual System, remove any occurrences of "console=XXX" or else the system will display to a nonexistent serial console instead of the virtual monitor port. Example: console=tty1 console=ttys0,9600n8  

 

 

5. Space 24.1R1 and Later release : Press  Ctrl+x  to boot. To reset the root password, you need access to the /sysroot directory with read and write permissions. To mount the/sysroot directory with the read and write permissions, enter the command example: # mount -o rw,remount /sysroot

 

 

6. Change the directory environment to /sysroot example: # chroot /sysroot

 

7. If you want to reset the admin password, type the command below. You will have to provide a new password and reset it later. Example: # passwd admin

8. Come back to Switch root prompt using exit and Reboot the system using "reboot -f" command

To reset admin password on Junos Space versions 15.2 and lower, 16.1+, 21.1+ till 23.1R1 release follow KB30506 [juniper.net]

Note : If you face any further issues, please contact JUNIPER JTAC Support for assistance.

 

Modification History

2025-02-17 : Article Created

2025-20-05: Minor edits and changed visibility

Related Information

Junos Space CLI password reset for 23.1 and below