解決ubuntu忘記密碼記錄

忘記普通用戶密碼:

  1. 重啟Ubuntu,隨即長按shift進入recover mode菜單(或F10);
  2. 選擇recovery mode,回車確認;
  3. 在Recovery Menu中,選擇“Root Drop to root shell prompt”,回車確認;
  4. 進入shell界面,使用passwd命令重新設定密碼:passwd wangyu,回車確認;看到密碼設定成功提示:passwd: password updated successfully;重啟系統:sudo reboot;

如果出現Authentication token manipulation error錯誤原因是The problem was that the system was started as read only, 運行"mount -rw -o remount /"

忘記root密碼:

  1. 開機按F10進入grub時,按e(不是回車
  2. 看到一行linux /boot/vm.......ro *****,(類似)
  3. 刪除*****, 在這行的最后添加 quiet splash rw init=/bin/bash
  4. 按F10, 啟動
  5. passwd, 系統會提示你輸入新的密碼,結束。
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容