解決ubuntu忘記密碼記錄

忘記普通用戶密碼:

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

如果出現(xiàn)Authentication token manipulation error錯(cuò)誤原因是The problem was that the system was started as read only, 運(yùn)行"mount -rw -o remount /"

忘記root密碼:

  1. 開機(jī)按F10進(jìn)入grub時(shí),按e(不是回車
  2. 看到一行l(wèi)inux /boot/vm.......ro *****,(類似)
  3. 刪除*****, 在這行的最后添加 quiet splash rw init=/bin/bash
  4. 按F10, 啟動(dòng)
  5. passwd, 系統(tǒng)會(huì)提示你輸入新的密碼,結(jié)束。
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容