版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
hillstone默认不提供重置密码的方法,这个有点不方便。
下面的提供的方法是可行的,验证通过:
https://max.book118.com/html/2018/0308/156398228.shtm
在出现Boot OS... 提示后,大概5秒钟才可以输入字符,可以多按几次回车,输入entershell也不用急,大概会等待20秒左右才会继续的。
最后由于不能使用vi,用sed做文本替换好了,比如:
sed 's/old_password/hillstone/' config.x >config.new
cp config.new config.x
然后reboot就可以了。
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.log vsys_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