WB6 root password recovery/en: различия между версиями

Материал из Wiren Board
(Обновление для соответствия новой версии исходной страницы.)
(Новая страница: «WB6 root password recovery»)
(не показаны 3 промежуточные версии 1 участника)
Строка 1: Строка 1:
<languages/>
{{DISPLAYTITLE:Wiren Board 6:Восстановление пароля пользователя root}}
{{DISPLAYTITLE:WB6 root password recovery}}


[[File:Stop_autoboot_6.png|thumb | 400px| uboot autoboot stop]]
[[File:Stop_autoboot_6.png|thumb | 400px|Остановка автозагрузки uboot]]
[[File:Stop_autoboot_commands_6.png|thumb | 400px|Stop_autoboot_commands.png| Entering commands]]
[[File:Stop_autoboot_commands_6.png|thumb | 400px|Stop_autoboot_commands.png| Вввод команд]]


==The procedure for recovering the root password on the Wiren Board 6 controller==
==Процедура восстановления пароля пользователя root на Wiren Board 6==
# Connect to the debug port of the [[Wiren Board 6/en| Wiren Board 6]] controller (via microUSB-connector Debug Console). The connection is described in detail on the [[Debug_UART/en|Debug UART]] page.  
# Подключаемся к отладочному порту контроллера [[Wiren_Board_6|Wiren Board 6]] (microUSB-разъем Debug Console). Подробно подключение описано на странице [[Debug_UART|Debug UART]].  
# 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.  
# Включаем питание контроллера (индикатор контроллера светится зеленым непрерывно) и при появлении сообщения с отбратным отсчетом "Hit any key to stop autoboot:" в UART-консоли нажимаем любую клавишу.  
# In response to the command line prompt  <code>=></code> sequentially enter the command:<br/><code>setenv optargs ro rootwait fixrtc single init=/bin/sh</code><br/><code>run bootcmd</code><br/> If you do not enter commands, watchdog restarts the controller.
# В ответ на приглашение командной строки <code>=></code> последовательно вводим команды:<br/><code>setenv optargs ro rootwait fixrtc single init=/bin/sh</code><br/><code>run bootcmd</code><br/> Если команды не вводить, то watchdog перезагрузит контроллер.
# After downloading (the indicator of the controller lights up red continuously), we obtain a system prompt <code>#</code>
# После загрузки (индикатор контроллера светится красным непрерывно) получаем системное приглашение <code>#</code>
# Mount the root filesystem<br/><code>mount -n -o remount,rw /dev/mmcblk0p2 /</code><br/> and we get the message <code> EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)</code>
# Монтируем корневую файловую систему<br/><code>mount -n -o remount,rw /dev/mmcblk0p2 /</code><br/>и получаем сообщение <code> EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)</code>
#Mount the partition from the configuration backup:<br/><code>mount /dev/mmcblk0p6 /mnt/data</code><br/>and we get the message <code>EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)</code>
#Монтируем раздел с резервной копии конфигурации:<br/><code>mount /dev/mmcblk0p6 /mnt/data</code><br/>и получаем сообщение <code>EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)</code>
#Enter <code>passwd</code> and change password. Successful password change: <code>passwd: password updated successfully</code>
#Вводим команду <code>passwd</code> и меняем пароль. Успешное изменение пароля: <code>passwd: password updated successfully</code>
# Copy the new password to the section from the configuration backup:<br/><code>cp /etc/shadow /mnt/data/etc</code>
#Копируем новый пароль в раздел с резервной копии конфигурации:<br/><code>cp /etc/shadow /mnt/data/etc</code>
# Unmount both file systems:<br/><code> # sync</code><br/><code> # umount /mnt/data</code><br/><code> # umount /</code>
#Отмонтируем обе файловые системы:<br/><code> # sync</code><br/><code> # umount /mnt/data</code><br/><code> # umount /</code>
# Turn off and turn on the power again. The password is changed.
#Выключаем и снова включаем питание. Пароль изменен.

Версия 13:29, 12 июня 2019

Внимание: Отображаемое название «Wiren Board 6:Восстановление пароля пользователя root» переопределяет ранее заданное отображаемое название «WB6 root password recovery».

Остановка автозагрузки uboot
Вввод команд

Процедура восстановления пароля пользователя root на Wiren Board 6

  1. Подключаемся к отладочному порту контроллера Wiren Board 6 (microUSB-разъем Debug Console). Подробно подключение описано на странице Debug UART.
  2. Включаем питание контроллера (индикатор контроллера светится зеленым непрерывно) и при появлении сообщения с отбратным отсчетом "Hit any key to stop autoboot:" в UART-консоли нажимаем любую клавишу.
  3. В ответ на приглашение командной строки => последовательно вводим команды:
    setenv optargs ro rootwait fixrtc single init=/bin/sh
    run bootcmd
    Если команды не вводить, то watchdog перезагрузит контроллер.
  4. После загрузки (индикатор контроллера светится красным непрерывно) получаем системное приглашение #
  5. Монтируем корневую файловую систему
    mount -n -o remount,rw /dev/mmcblk0p2 /
    и получаем сообщение EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
  6. Монтируем раздел с резервной копии конфигурации:
    mount /dev/mmcblk0p6 /mnt/data
    и получаем сообщение EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
  7. Вводим команду passwd и меняем пароль. Успешное изменение пароля: passwd: password updated successfully
  8. Копируем новый пароль в раздел с резервной копии конфигурации:
    cp /etc/shadow /mnt/data/etc
  9. Отмонтируем обе файловые системы:
    # sync
    # umount /mnt/data
    # umount /
  10. Выключаем и снова включаем питание. Пароль изменен.