In this short blog, I show how to easily change the root password on Juniper JunOS [JunOS 11.1R6.4] switches. It’s important to note, on a switch reset to default configuration, you can easily log into the switch with just the ‘root’ username without a password, however, you will not be able to ‘commit’ changes to the configuration until you set the root password; if you attempt to do so, you will get an error message stating “Missing mandatory statement: ‘root-authentication’error: configuration check-out failed: (missing statements)”. Below is a screenshot from a Juniper EX4200-48T displaying how to set/change the root password.
Optionally, if you strengthen security by only allowing root access from the console port, you can utilize the following command under ‘edit/config’ mode:
“set system services ssh root-login deny” for ssh or “set system services telnet root-login deny” for telnet.
Tags: 'root-authentication'error, 11.1R6.4, change root password, configuration check-out failed, EX4200, EX4200-48T, Juniper EX4200, Juniper EX4200-48T, Juniper JunOS, Juniper JunOS switch, JunOS, JunOS 11.1R6.4, Missing mandatory statement, missing statements, root password, set root password