忘记 root 密码
方法:通过串口进入failsafe
模式后,执行“passwd”命令修改root密码;
硬件:USB转串口线一条;
软件:Windows
平台需要Putty
;Linux
平台需要minicom
;
操作步骤:
- 正确安装串口线的驱动;
- 打开软件,使用
115200/8/N/1
连接设备的串口(请注意收发顺序、TTL与RS-232的区别); - 打开设备电源,软件应该显示开机日志;
- 直至软件显示开机日志如下:
- 按
f
键+回车键,进入failsafe
模式
- 按
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
f
- failsafe -
[ 13.29000] eth0: link up (10Mbps/Half duplex)
BusyBox v1.19.4 (2017-02-03 14:14:23 EST) built-in shell (ash)
Enter 'help' for a list of built-in commands.
root@(none):/#
- 执行以下命令
root@(none):/# mount_root
root@(none):/# passwd
Changing password for root
New password: |
Bad password: too short
Retype password: |
Password for root changed by root
root@(none):/#