JunOS:如何重设root密码
时间:2020-02-23 14:44:15 来源:igfitidea点击:
以下过程是有关重置根密码并在运行JunOS的Juniper设备上保留当前配置的过程。
1.很快,您会看到"单击[Enter]立即启动,或者单击空格键以显示命令提示符。
"信息,只需按指示的空格键:
FreeBSD/PowerPC U-Boot bootstrap loader, Revision 2.1 ([email protected], Wed Nov 6 11:23:55 PST 2008) Memory: 1024MB Loading /boot/defaults/loader.conf /kernel data=0x8d8e8c+0x947cc syms=[0x4+0x7a1a0+0x4+0xad2a2] Hit [Enter] to boot immediately, or space bar for command prompt. Booting [/kernel] in 1 second… Type ‘?’ for a list of commands, ‘help’ for more detailed help.
2.在提示符下,输入" boot -s"命令:
loader> boot -s
输出:
[...] Trying to mount root from ufs:/dev/da0s2a Attaching /packages/jbase via /dev/mdctl... Mounted jbase package on /dev/md0... System watchdog timer disabled Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh: recovery NOTE: Once in the CLI, you will need to enter configuration mode using NOTE: the 'configure' command to make any required changes. For example, NOTE: to reset the root password, type: NOTE: configure NOTE: set system root-authentication plain-text-password NOTE: (enter the new password when asked) NOTE: commit NOTE: exit NOTE: exit NOTE: When you exit the CLI, you will be asked if you want to reboot NOTE: the system Starting CLI ... {linecard:0}
3.使用" configure"命令进入配置模式:
root> configure Entering configuration mode {linecard:0}[edit]
4.输入命令" set system root-authentication plain-text-password"以设置新的JunOS根密码:
root# set system root-authentication plain-text-password New password: Retype new password: {linecard:0}[edit]
5.提交更改:
root# commit fpc0: commit complete {linecard:0}[edit]
6.退出配置和执行模式,然后按以下步骤重新引导系统:
root# exit Exiting configuration mode {linecard:0} root> exit Reboot the system? [y/n] y