灰儿 发表于 2021-9-26 23:54:02

山石网科(hillstone)防火墙设备密码与配置恢复方法

山石网科(hillstone)防火墙设备密码与配置恢复方法,山石网科(hillstone)防火墙不清空配置重新设置密码方法

山石网科(hillstone) SG-6000 系列防火墙默认不提供重置密码的方法,这个有点不方便。防火墙忘记密码怎么办?通过boot os重置山石防火墙密码而不影响配置文件,此操作安全可靠亲身实践,希望能帮到有需要的人。下面的提供的方法是可行的,验证通过:

一、重启防火墙等待出现 “boot os…”   时输入:“entershell” 命令

在出现Boot OS... 提示后,大概5秒钟才可以输入字符,可以多按几次回车,输入entershell也不用急,大概会等待20秒左右才会继续的。
LMC0 init.........................done
DRAM: 1 GB
BOOTROM: 512 KB

Press ESC to stop autoboot:0

Loading SG6000-M-3-5.5R2P7.14.bin
########################################

Load complete: 53977088 bytes loaded
Boot OS...

entershell



BusyBox v1.20.2 (2014-02-17 20:50:45 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ #
~ # cd flash
/wr_point/etc/mnt/mtdblock4 # cd config
/wr_point/etc/mnt/mtdblock4/config # ls
config.0         config0.bak      test.txt
config.conf      nosavedconfig.logvsys_config.conf
/wr_point/etc/mnt/mtdblock4/config # cmp test.txt config.0
test.txt config.0 differ: char 9820, line 389
/wr_point/etc/mnt/mtdblock4/config # cmp config.0 config0.bak
/wr_point/etc/mnt/mtdblock4/config # cp test.txt config.0
/wr_point/etc/mnt/mtdblock4/config # cmp test.txt config.0
/wr_point/etc/mnt/mtdblock4/config # reboot
The system is going down NOW!onfig #
Requesting system reboot


二、查看配置备份文件

# cd flash/config    //进入配置文件夹



三、修改配置文件里的password密码

最后由于使用 vi 文本编辑命令后无法保存,改用用 sed 命令做文本替换好了,比如:

sed 's/old_password/hillstone/' config.x>config.new

cp config.new config.x

然后reboot就可以了。



相关链接:
https://max.book118.com/html/2018/0308/156398228.shtm   Hillstone设备密码与配置恢复方法.docx
https://wenku.baidu.com/view/35aca2af3386bceb19e8b8f67c1cfad6195fe9b3.htmlHillstone设备密码与配置恢复方法

https://download.csdn.net/download/fhxzh521/13196485




页: [1]
查看完整版本: 山石网科(hillstone)防火墙设备密码与配置恢复方法