方法1:

用过Juniper产品的人都应该知道一点,Juniper产品密码忘了的话是一件很痛苦的事,为什么这么说呢?下来就来听我给大家讲讲嘛!

密码丢失是无法恢复的,那么我们就只有通过恢复出厂默认设置的方法来重新获得管理权限(原来配置的参数、证书等都将被删除)。

有两种办法恢复出厂默认配置:

1、在Console模式下,用设备的序列号作用用户名/密码进行登录。

     成功后系统出现警告提示,将擦去现有配置,确认后系统开始恢复默认配置,随后重启。整个过程约3分钟。

那么我们如何获得这个序列号呢?要获得这个序列号的办法有两种,第一种就是在产品的背后有一个序列号。第二种办法就是通过输入“get sys”来获取。

这里我们先来看看Juniper防火墙的启动过程:

 

NetScreen NS-5GT Boot Loader Version 2.1.0 (Checksum: 61D07DA5)
Copyright (c) 1997-2003 NetScreen Technologies, Inc.

Total physical memory: 128MB
    Test - Pass
    Initialization.... Done

Hit any key to run loader
Hit any key to run loader
Hit any key to run loader
Hit any key to run loader

Loading default system p_w_picpath from on-board flash disk...
Done! (size = 11,108,352 bytes)
Ignore p_w_picpath authentication!

Start loading...
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
.................................................................
......................................
Done.

Juniper Networks, Inc
NS-5GT System Software
Copyright, 1997-2008

Version 6.2.0r1.0
Load Manufacture Information ... Done

Initialize FBTL 0.... Done
Load NVRAM Information ... (6.2.0)Done
SYIMAGE
Install module init vectors
build and grow heap:system, order:13

Initial port mode trust-untrust(1)
Install modules (00fdc800,01bf5c70) ...
PPP IP-POOL initiated, 256 pools
System config (1945 bytes) loaded

Done.
Load System Configuration ..................................................................................................................................Disabled licensekey auto update
...................Done
system init done..
login: trust interface change physical state to Up
untrust interface change physical state to Up

login: System change state to Active(1)

以上就是我们Juniper防火墙的启动过程,这里学过cisco的应该大至是能够理解的。

那么我们现在用我们的根用户登录进去,查看一下我们这款设置和序列号:

login: admin  这里要注意用户名是我改过了的,默认是:netscreen密码也是netscreen
password:    这里有一点linux基础的都知道,我们在这里输入用户名是不会有任何显示的。不要认为是没有输入进去的哈。
ns5gt->  到这里就表示我们已经登录进来了

下面我们来查看一下这款设备的序列号:

ns5gt-> get system    查看系统信息
Product Name: NetScreen-NS5GT
Serial Number: 0064012008003751, Control Number: 00000000
Hardware Version: 1010(0)-(00), FPGA checksum: 00000000, VLAN1 IP (0.0.0.0)
Software Version: 6.2.0r1.0, Type: Firewall+×××
Compiled by build_master at: Wed Oct 15 21:31:36 PDT 2008
Base Mac: 001d.b5b1.aae0
File Name: screenos_p_w_picpath, Checksum: b299462d

......以下的省略了

在上面Serial Number后面的数字就是我们的序列号。

我们将些序列号复制出来

然后输入exit退出到登录处。

login: 0064012008003751   注意这里的用户名就是我们的序列号,下面的密码也是我们的序列号
password:
!!! Lost Password Reset !!! You have initiated a command to reset the device to factory defaults, clearing all current configuration and settings. Would you like to continue?  y/[n] y      在这里我们输入y

!! Reconfirm Lost Password Reset !! If you continue, the entire configuration of the device will be erased. In addition, a permanent counter will be incremented to signify that this device has been reset. This is your last chance to cancel this command. If you proceed, the device will return to factory default configuration, which is: System IP: 192.168.1.1; username: netscreen, password: netscreen. Would you like to continue?  y/[n] y   在这里我们输入y
In reset ...

好了这样我们就恢复了出厂默认设置,我们等一会起动启来以后看看用我们的默认用户名密码可以登录不?

login: netscreen      我们这里可以看见我们输入的就是出厂时候的默认的用户名与密码。
password:
ns5gt->

我们再通过http登录一下看看能否登录进去。

http://192.168.1.1

用户名:netscreen

密码:netscreen


 

方法2:

如果丢失 admin 密码,则可以使用下列步骤将 NetScreen 设备重置到其缺省设置。配置将丢失,但是对设备的访问将

恢复。要执行此操作,需要建立控制台连接,在 NetScreen CLI Reference Guide 和安装指南中对其进行了详细描述。

1. 在登录提示下,键入设备的序列号。

2. 在密码提示下,再次键入序列号。

出现以下消息:

!!!! Lost Password Reset !!!! You have initiated a command to reset the device to factory defaults, clearing all

current configuration, keys and settings. Would you like to continue? y/n

(!!!! 丢失密码重置!!!! 您已发出将设备重置为出厂缺省值的命令,这将清除所有当前配置、密钥和设置。是

否要继续? y/n)

3. 按 y 键。

出现以下消息:

!! Reconfirm Lost Password Reset !! If you continue, the entire configuration of the device will be erased. In

addition, a permanent counter will be incremented to signify that this device has been reset. This is your last

chance to cancel this command. If you proceed, the device will return to factory default configuration, which

is: System IP: 192.168.1.1; username: netscreen; password: netscreen. Would you like to continue? y/n

(!!重新确认丢失密码重置!!如果继续,设备的全部配置都将被拭除。另外,永久性计数器将递增,以指示

此设备已被重置。这是您取消此命令的最后机会。如果继续,设备将返回出厂缺省值,即:系统 IP:

192.168.1.1; 用户名:netscreen; 密码:netscreen。是否要继续?