WB6 root password recovery

Материал из Wiren Board
Это утверждённая версия страницы. Она же — наиболее свежая версия.
Другие языки:


uboot autoboot stop
Entering commands

The procedure for recovering the root password on the Wiren Board 6 controller

  1. Connect to the debug port of the Wiren Board 6 controller (via microUSB-connector Debug Console). The connection is described in detail on the Debug UART page.
  2. Turn on the power of the controller (the controller indicator lights green continuously) and when a message "Hit any key to stop autoboot:" appears with the selected countdown in the UART console, then press any key.
  3. In response to the command line prompt => sequentially enter the command:
    setenv optargs ro rootwait fixrtc single init=/bin/sh
    run bootcmd
    If you do not enter commands, watchdog restarts the controller.
  4. After downloading (the indicator of the controller lights up red continuously), we obtain a system prompt #
  5. Mount the root filesystem
    mount -n -o remount,rw /dev/mmcblk0p2 /
    and we get the message EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
  6. Mount the partition from the configuration backup:
    mount /dev/mmcblk0p6 /mnt/data
    and we get the message EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
  7. Enter passwd and change password. Successful password change: passwd: password updated successfully
  8. Copy the new password to the section from the configuration backup:
    cp /etc/shadow /mnt/data/etc
  9. Unmount both file systems:
    # sync
    # umount /mnt/data
    # umount /
  10. Turn off and turn on the power again. The password is changed.