This article explains how to recover the admin Linux password for a Juniper Apstra Server VM after losing the admin password and being unable to log in to the Juniper Apstra Server VM Linux CLI.
WARNING: This requires console access to the Juniper Apstra Server VM. This requires rebooting the Juniper Apstra Server VM. Any deployed Juniper Apstra Fabric will not be impacted.
Attach to the Juniper Apstra Server VM console and send a “reset” signal to the VM. Press the esc or shift key in the console immediately on reboot to access the GRUB menu.
Select Advanced options for Ubuntu .
(for Juniper Apstra 2.3 and later only) For username, enter admin and for password , enter apstra .
admin
apstra
At the next GRUB menu, select the first (recovery mode) option.
From the Recovery Menu , select root , and then press Enter to enter a root shell prompt.
At the root shell prompt, enter mount-o rw,remount / , and then passwd admin to reset the password for the default admin user for the Juniper Apstra Server VM Linux CLI.
mount-o rw,remount /
passwd admin
Enter sync , and then reboot to reboot the VM.
sync
reboot
After reboot, log in to the Juniper Apstra Server VM Linux CLI as user admin with the new password.